From f1a84ff811e3dda3e457572968c7775a12ec7c68 Mon Sep 17 00:00:00 2001 From: Artem Los Date: Fri, 27 Jan 2023 13:42:24 +0100 Subject: [PATCH] Fix LoadFromFile --- methods/Helpers.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/methods/Helpers.js b/methods/Helpers.js index dfc3619..1ca4916 100644 --- a/methods/Helpers.js +++ b/methods/Helpers.js @@ -33,7 +33,7 @@ module.exports = class Helpers { const response = JSON.parse(string); if (helpers.VerifySignature(response, rsaPubKey)) { - const licenseKey = JSON.parse(Buffer.from(response.licenseKey, 'base64').toString("utf-8")); + const licenseKey = JSON.parse(Buffer.from(helpers.GetValueCaseInsensitive(response,"licenseKey"), 'base64').toString("utf-8")); const signed = new Date(licenseKey.SignDate * 1000); const exp = new Date(signed.getFullYear(), signed.getMonth(), signed.getDate() + signatureExpirationInterval); if (signatureExpirationInterval > 0 && new Date() > exp) { diff --git a/package.json b/package.json index 6876a71..d0f87c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cryptolens", - "version": "1.0.13", + "version": "1.0.14", "description": "Client API for NodeJS to access Cryptolens Software Licensing API.", "main": "main.js", "scripts": {