@it-enterprise/digital-signature 1.5.4 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/euscp.worker.js +893 -342
- package/dist/it-digital-signature.mjs +322 -323
- package/dist/it-digital-signature.mjs.map +1 -1
- package/dist/it-digital-signature.umd.js +1 -1
- package/dist/it-digital-signature.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/DigitalSignature.js +4 -2
- package/src/Models.js +21 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@it-enterprise/digital-signature",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"description": "IT-Enterprise package for digital signature",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@babel/core": "^7.29.7",
|
|
33
33
|
"@babel/eslint-parser": "^7.29.7",
|
|
34
34
|
"eslint": "^9.39.5",
|
|
35
|
-
"node-forge": "^1.4.
|
|
35
|
+
"node-forge": "^1.4.3",
|
|
36
36
|
"vite": "^8.2.2",
|
|
37
37
|
"vite-plugin-babel": "^1.7.3"
|
|
38
38
|
},
|
package/src/DigitalSignature.js
CHANGED
|
@@ -1501,14 +1501,16 @@ export default class DigitalSignature {
|
|
|
1501
1501
|
if (!storedKeys) {
|
|
1502
1502
|
return result;
|
|
1503
1503
|
}
|
|
1504
|
-
const data = await this._euSignFile.UnprotectDataByPassword(storedKeys, "", true);
|
|
1505
1504
|
try {
|
|
1505
|
+
const data = await this._euSignFile.UnprotectDataByPassword(storedKeys, "", true);
|
|
1506
|
+
|
|
1506
1507
|
ls = JSON.parse(data);
|
|
1507
1508
|
if (keyType >= 0) {
|
|
1508
1509
|
ls = ls.filter(key => key.keyType == keyType);
|
|
1509
1510
|
}
|
|
1510
1511
|
}
|
|
1511
|
-
catch {
|
|
1512
|
+
catch (e) {
|
|
1513
|
+
console.error("Error while reading stored keys", e);
|
|
1512
1514
|
ls = [];
|
|
1513
1515
|
}
|
|
1514
1516
|
|
package/src/Models.js
CHANGED
|
@@ -539,7 +539,17 @@ export function getDefaultKSPs(allowTest) {
|
|
|
539
539
|
diia.address = "https://diia-sign.it.ua/KSPSign";
|
|
540
540
|
diia.systemId = "diia-sign-it-ent";
|
|
541
541
|
diia.needQRCode = true;
|
|
542
|
-
|
|
542
|
+
|
|
543
|
+
const diiaTest = new KSPSettings();
|
|
544
|
+
diiaTest.id = "DIIA-SIGN-TEST";
|
|
545
|
+
diiaTest.name = "Дія.Підпис (Тест)";
|
|
546
|
+
diiaTest.ksp = EndUserConstants.EU_KSP_DIIA;
|
|
547
|
+
diiaTest.directAccess = false;
|
|
548
|
+
diiaTest.mobileAppName = "Дія";
|
|
549
|
+
diiaTest.address = "https://test-diia-sign.it.ua/KSPSign";
|
|
550
|
+
diiaTest.systemId = "test-diia-sign-it-ent";
|
|
551
|
+
diiaTest.authSystemId = "test-diia-sign-it-ent-auth";
|
|
552
|
+
diiaTest.needQRCode = true;
|
|
543
553
|
|
|
544
554
|
const smartId = new KSPSettings();
|
|
545
555
|
smartId.id = "PB-SMARTID";
|
|
@@ -720,6 +730,7 @@ export function getDefaultKSPs(allowTest) {
|
|
|
720
730
|
];
|
|
721
731
|
|
|
722
732
|
if (allowTest) {
|
|
733
|
+
ksps.push(diiaTest);
|
|
723
734
|
ksps.push(vtoken);
|
|
724
735
|
}
|
|
725
736
|
|
|
@@ -789,11 +800,19 @@ export class KSPPrivateKeyAuthData {
|
|
|
789
800
|
* @param {string} pin Пароль от ключа
|
|
790
801
|
* @param {string} token Токен авторизации аккаунта
|
|
791
802
|
* @param {string} twoFactorCode Код двухфакторной авторизации
|
|
803
|
+
* @param {string} name Сообщение, которое отоброзится пользователю в приложении для подтверждения операции
|
|
804
|
+
* @param {string} val Хеш уникального идентификатора операции
|
|
805
|
+
* @param {string} operationId Идентификатор операции (данные для подписи), если не было указано val
|
|
806
|
+
* @param {string} signature Подпись, полученная в ходе авторизации
|
|
792
807
|
*/
|
|
793
|
-
constructor(pin, token, twoFactorCode) {
|
|
808
|
+
constructor(pin, token, twoFactorCode, name, val, operationId, signature) {
|
|
794
809
|
this.pin = pin;
|
|
795
810
|
this.token = token;
|
|
796
811
|
this.twoFactorCode = twoFactorCode;
|
|
812
|
+
this.name = name;
|
|
813
|
+
this.val = val;
|
|
814
|
+
this.operationId = operationId;
|
|
815
|
+
this.signature = signature;
|
|
797
816
|
}
|
|
798
817
|
}
|
|
799
818
|
|