@it-enterprise/digital-signature 1.3.19 → 1.3.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@it-enterprise/digital-signature",
3
- "version": "1.3.19",
3
+ "version": "1.3.20",
4
4
  "description": "digital signature",
5
5
  "private": false,
6
6
  "main": "src/index.js",
@@ -1,6 +1,6 @@
1
1
  import { EndUser, EndUserConstants, EndUserProxySettings, EndUserError, KSPSettings, EndUserCertificate, EndUserKeyMedia, EndUserSignContainerInfo, EndUserCertificateInfoEx, EndUserTaxReport } from "../euscp/euscp";
2
2
  import { DigitalSignatureKeyType, PrivateKeyInfo, FilePrivateKeyInfo, HardwarePrivateKeyInfo, KspPrivateKeyInfo, EndUserKSP, KSPKeyMediasResponse, KSPUserAuthData, KSPPrivateKeyAuthData, DigitalSignatureKeyTypeWindowsCertStore, ProtectTaxReportParams } from "./Models";
3
- import { base64ToArray, convertToBase64, downloadAndSignFiles, downloadData, format, isDefaultValue, readFile, signAlgoToHashAlgo } from "./Utils";
3
+ import { base64ToArray, convertToBase64, downloadAndSignFiles, downloadData, format, isDefaultValue, readFile } from "./Utils";
4
4
  import Resourses from "./Resourses.json";
5
5
  import GlSign from "./GlSign";
6
6
 
@@ -307,6 +307,8 @@ export default class DigitalSignature {
307
307
  return await this.readHardwareKey(keyInfo.keyMedia, keyInfo.certificates);
308
308
  case DigitalSignatureKeyType.KSP:
309
309
  return await this.readPrivateKeyKSP(keyInfo.ksp, keyInfo.kspUserId, false);
310
+ default:
311
+ return null;
310
312
  }
311
313
  }
312
314
 
@@ -346,6 +348,7 @@ export default class DigitalSignature {
346
348
  await this._euSign.GetOwnCertificates(),
347
349
  keyMedia
348
350
  );
351
+ this._readedKey._glSign = this._glSign;
349
352
  return this._readedKey;
350
353
  } catch (error) {
351
354
  if (error && error.code === EndUserError.EU_ERROR_CERT_NOT_FOUND) {
@@ -412,6 +415,7 @@ export default class DigitalSignature {
412
415
  privateKey,
413
416
  password
414
417
  );
418
+ this._readedKey._glSign = this._glSign;
415
419
  return this._readedKey;
416
420
  } catch (error) {
417
421
  if (error && error.code === EndUserError.EU_ERROR_CERT_NOT_FOUND) {
@@ -466,7 +470,7 @@ export default class DigitalSignature {
466
470
  * @param {boolean?} getCerts - Получать информацию о ключе пользователя. Это приведёт к дополнительному запросу на подписание
467
471
  */
468
472
  async readPrivateKeyDepositsign(userId, getCerts = false) {
469
- const deposit = this.KSPs.find(ksp => ksp.id === "depositsign");
473
+ const deposit = this.KSPs.find(ksp => ksp.id === "DEPOSITSIGN");
470
474
  return await this.readPrivateKeyKSP(deposit, userId, getCerts);
471
475
  }
472
476
 
@@ -475,7 +479,7 @@ export default class DigitalSignature {
475
479
  * @param {boolean?} getCerts - Получать информацию о ключе пользователя. Это приведёт к дополнительному запросу на подписание
476
480
  */
477
481
  async readPrivateKeyDiia(getCerts = false) {
478
- const diia = this.KSPs.find(ksp => ksp.id === "diia-sign");
482
+ const diia = this.KSPs.find(ksp => ksp.id === "DIIA-SIGN");
479
483
  return await this.readPrivateKeyKSP(diia, null, getCerts);
480
484
  }
481
485
 
@@ -509,6 +513,7 @@ export default class DigitalSignature {
509
513
  ksp,
510
514
  keyId
511
515
  );
516
+ this._readedKey._glSign = this._glSign;
512
517
  return this._readedKey;
513
518
  }
514
519
 
@@ -574,7 +579,7 @@ export default class DigitalSignature {
574
579
  const certInfo = await this.parseCertificate(keyInfo.Cert);
575
580
 
576
581
  this._readedKey = new PrivateKeyInfo(DigitalSignatureKeyType.WindowsCertStore, certInfo.infoEx, [certInfo], certInfo.infoEx.subjCN, keyInfo.CertThumbPrint);
577
-
582
+ this._readedKey._glSign = this._glSign;
578
583
  return this._readedKey;
579
584
  }
580
585
 
@@ -693,7 +698,7 @@ export default class DigitalSignature {
693
698
  }
694
699
  }
695
700
 
696
- const signAlgo = this._readedKey.getSignAlgo(this.glSign);
701
+ const signAlgo = this._readedKey.getSignAlgo();
697
702
 
698
703
  if (signType.type === EndUserConstants.EndUserSignContainerType.ASiC) {
699
704
  const signLevel = signType.signLevel || signType.asicSignType === EndUserConstants.EndUserASiCSignType.CAdES ? EndUserConstants.EndUserSignType.CAdES_X_Long : EndUserConstants.EndUserXAdESSignLevel.B_LT;
@@ -721,7 +726,7 @@ export default class DigitalSignature {
721
726
  await this._euSign.SetRuntimeParameter(EndUserConstants.EU_SIGN_TYPE_PARAMETER, signLevel);
722
727
 
723
728
  if (signType.subType === EndUserConstants.EndUserCAdESType.Detached) {
724
- const hash = await this._euSign.HashData(this._readedKey.getHashAlgo(this.glSign), data, !asByteArray);
729
+ const hash = await this._euSign.HashData(this._readedKey.getHashAlgo(), data, !asByteArray);
725
730
 
726
731
  if (this._readedKey.keyType == DigitalSignatureKeyTypeWindowsCertStore) {
727
732
  return this._signHashWindowsCertificateStore(hash, signType, asByteArray);
@@ -731,7 +736,7 @@ export default class DigitalSignature {
731
736
  } else {
732
737
 
733
738
  if (this._readedKey.keyType == DigitalSignatureKeyTypeWindowsCertStore) {
734
- const hash = await this._euSign.HashData(this._readedKey.getHashAlgo(this.glSign), data, !asByteArray);
739
+ const hash = await this._euSign.HashData(this._readedKey.getHashAlgo(), data, !asByteArray);
735
740
  const signedData = await this._signHashWindowsCertificateStore(hash, signType, asByteArray);
736
741
 
737
742
  return this._euSign.m_library.m_worker.postMessage("AppendDataToSignedData", [signedData, data, !asByteArray]);
@@ -771,7 +776,7 @@ export default class DigitalSignature {
771
776
  return this._signHashWindowsCertificateStore(hash, false, asByteArray);
772
777
  }
773
778
 
774
- return await this._euSign.SignHash(this._readedKey.getSignAlgo(this.glSign), hash, true, !asByteArray);
779
+ return await this._euSign.SignHash(this._readedKey.getSignAlgo(), hash, true, !asByteArray);
775
780
  }
776
781
 
777
782
  /**
@@ -1193,6 +1198,7 @@ export default class DigitalSignature {
1193
1198
  );
1194
1199
  readedKey.context = ctx;
1195
1200
  readedKey.keyContext = keyCtx;
1201
+ readedKey._glSign = this._glSign;
1196
1202
  return readedKey;
1197
1203
  } catch (error) {
1198
1204
  if (error && error.code === EndUserError.EU_ERROR_CERT_NOT_FOUND) {
@@ -1262,6 +1268,7 @@ export default class DigitalSignature {
1262
1268
  );
1263
1269
  readedKey.context = ctx;
1264
1270
  readedKey.keyContext = keyCtx;
1271
+ readedKey._glSign = this._glSign;
1265
1272
  return readedKey;
1266
1273
  } catch (error) {
1267
1274
  if (error && error.code === EndUserError.EU_ERROR_CERT_NOT_FOUND) {
package/src/GlSign.js CHANGED
@@ -102,12 +102,8 @@ export default class GlSign {
102
102
  }
103
103
 
104
104
  this.KSPs.forEach(element => {
105
- if (element.ksp === EU_KSP_DIIA || element.address.includes("acsk.privatbank.ua/cloud") || element.address.includes("cs.vchasno.ua")) {
106
- if (IS_DSTU_7564_DAY()) {
107
- element.signAlgos = [ EndUserConstants.EndUserSignAlgo.DSTU4145WithDSTU7564 ];
108
- } else {
109
- element.signAlgos = [ EndUserConstants.EndUserSignAlgo.DSTU4145WithGOST34311 ];
110
- }
105
+ if (/* element.ksp === EU_KSP_DIIA || */ element.address.includes("acsk.privatbank.ua/cloud") || element.address.includes("cs.vchasno.ua")) {
106
+ element.signAlgos = [ EndUserConstants.EndUserSignAlgo.DSTU4145WithDSTU7564, EndUserConstants.EndUserSignAlgo.DSTU4145WithGOST34311 ];
111
107
  }
112
108
  // if (element.ksp === EU_KSP_GRYADA) {
113
109
  // element.signAlgos = this.HashAlgorithm !== "GOST34311" ? [ EndUserSignAlgo.DSTU4145WithDSTU7564 ] : [ EndUserSignAlgo.DSTU4145WithGOST34311 ];
package/src/Models.js CHANGED
@@ -413,24 +413,21 @@ export class PrivateKeyInfo {
413
413
  /**
414
414
  * Получить алгоритм подписи
415
415
  */
416
- getSignAlgo(glsign = null) {
416
+ getSignAlgo() {
417
417
  const certificates = this.certificates;
418
418
  if (this.keyType === DigitalSignatureKeyTypeKSP) {
419
- if (this.ksp.ksp === EU_KSP_DIIA || this.ksp.address.includes("acsk.privatbank.ua/cloud") || this.ksp.address.includes("cs.vchasno.ua")) {
420
- if (IS_DSTU_7564_DAY()) {
421
- return EndUserConstants.EndUserSignAlgo.DSTU4145WithDSTU7564;
422
- } else {
423
- return EndUserConstants.DSTU4145WithGOST34311;
419
+ const ksp = this.ksp;
420
+ if (Array.isArray(ksp.signAlgos) && ksp.signAlgos.length > 0) {
421
+ const signAlgo = ksp.signAlgos[0];
422
+ if (signAlgo === EndUserConstants.EndUserSignAlgo.DSTU4145WithDSTU7564 && this._glsign?.HashAlgorithm === "GOST34311" && ksp.signAlgos.includes(EndUserConstants.EndUserSignAlgo.DSTU4145WithGOST34311)) {
423
+ return EndUserConstants.EndUserSignAlgo.DSTU4145WithGOST34311;
424
424
  }
425
+ return signAlgo;
425
426
  }
426
- // if (this.ksp.ksp === EU_KSP_GRYADA) {
427
- // return glsign?.HashAlgorithm !== "GOST34311" ? EndUserSignAlgo.DSTU4145WithDSTU7564 : EndUserSignAlgo.DSTU4145WithGOST34311;
428
- // }
429
-
430
427
  return EndUserConstants.EndUserSignAlgo.DSTU4145WithGOST34311;
431
428
  }
432
429
  else if (certificates.length > 0) {
433
- return getSupportedSignAlgos(certificates, glsign)[0];
430
+ return getSupportedSignAlgos(certificates, this._glsign)[0];
434
431
  }
435
432
  else {
436
433
  return EndUserConstants.EndUserSignAlgo.Unknown;
@@ -440,30 +437,19 @@ export class PrivateKeyInfo {
440
437
  /**
441
438
  * Получить алгоритм хеширования
442
439
  */
443
- getHashAlgo(glsign = null) {
440
+ getHashAlgo() {
444
441
  if (this.keyType === DigitalSignatureKeyTypeKSP) {
445
- if (this.ksp.ksp === EU_KSP_DIIA || this.ksp.address.includes("acsk.privatbank.ua/cloud") || this.ksp.address.includes("cs.vchasno.ua")) {
446
- if (IS_DSTU_7564_DAY()) {
447
- return EndUserConstants.EndUserHashAlgo.DSTU7564_256;
448
- } else {
449
- return EndUserConstants.EndUserHashAlgo.GOST34311;
450
- }
451
- }
452
- // if (this.ksp.ksp === EU_KSP_GRYADA) {
453
- // return glsign?.HashAlgorithm !== "GOST34311" ? EndUserConstants.EndUserHashAlgo.DSTU7564_256 : EndUserConstants.EndUserHashAlgo.GOST34311;
454
- // }
455
-
456
- return EndUserConstants.EndUserHashAlgo.GOST34311;
442
+ return signAlgoToHashAlgo(this.getSignAlgo());
457
443
  }
458
444
 
459
445
  const certificates = this.certificates;
460
446
  if (certificates.length > 0 && certificates[0]?.infoEx?.certHashType) {
461
447
  const hashType = certificates[0].infoEx.certHashType;
462
448
 
463
- if (hashType == EndUserConstants.EndUserHashAlgo.GOST34311 && glsign?.HashAlgorithm !== "GOST34311") {
449
+ if (hashType == EndUserConstants.EndUserHashAlgo.GOST34311 && this._glsign?.HashAlgorithm !== "GOST34311") {
464
450
  return EndUserConstants.EndUserHashAlgo.DSTU7564_256;
465
451
  }
466
- if (hashType == EndUserConstants.EndUserHashAlgo.DSTU7564_256 && glsign?.HashAlgorithm === "GOST34311") {
452
+ if (hashType == EndUserConstants.EndUserHashAlgo.DSTU7564_256 && this._glsign?.HashAlgorithm === "GOST34311") {
467
453
  return EndUserConstants.EndUserHashAlgo.GOST34311;
468
454
  }
469
455
 
@@ -520,17 +506,16 @@ export class KspPrivateKeyInfo extends PrivateKeyInfo {
520
506
 
521
507
  export function getDefaultKSPs(allowTest) {
522
508
  const depositsign = new KSPSettings();
523
- depositsign.id = "depositsign";
509
+ depositsign.id = "DEPOSITSIGN";
524
510
  depositsign.name = "DepositSign";
525
511
  depositsign.ksp = EndUserConstants.EU_KSP_PB;
526
512
  depositsign.address = "https://depositsign.com/api/v1/it-enterprise/sign-server";
527
513
  depositsign.clientIdPrefix = "";
528
514
  depositsign.directAccess = true;
529
515
  depositsign.needQRCode = false;
530
- depositsign.codeEDRPOU = "43005049";
531
516
 
532
517
  const diia = new KSPSettings();
533
- diia.id = "diia-sign";
518
+ diia.id = "DIIA-SIGN";
534
519
  diia.name = "Дія.Підпис";
535
520
  diia.ksp = EndUserConstants.EU_KSP_DIIA;
536
521
  diia.directAccess = false;
@@ -538,11 +523,10 @@ export function getDefaultKSPs(allowTest) {
538
523
  diia.address = "https://diia-sign.it.ua/KSPSign";
539
524
  diia.systemId = "diia-sign-it-ent";
540
525
  diia.needQRCode = true;
541
- diia.codeEDRPOU = "43395033";
542
526
  diia.signAlgos = [1];
543
527
 
544
528
  const smartId = new KSPSettings();
545
- smartId.id = "pb-smartid";
529
+ smartId.id = "PB-SMARTID";
546
530
  smartId.name = "Приватбанк - хмарний підпис \"SmartID\"";
547
531
  smartId.ksp = EndUserConstants.EU_KSP_PB;
548
532
  smartId.directAccess = true;
@@ -551,20 +535,18 @@ export function getDefaultKSPs(allowTest) {
551
535
  smartId.clientIdPrefix = "IEIS_";
552
536
  smartId.confirmationURL = "https://www.privat24.ua/rd/kep";
553
537
  smartId.needQRCode = true;
554
- smartId.codeEDRPOU = "14360570";
555
538
 
556
539
  const vchasno = new KSPSettings();
557
- vchasno.id = "vchasno";
540
+ vchasno.id = "VCHASNO";
558
541
  vchasno.name = "Вчасно - хмарний підпис";
559
542
  vchasno.ksp = EndUserConstants.EU_KSP_PB;
560
543
  vchasno.address = "https://cs.vchasno.ua/ss/";
561
544
  vchasno.clientIdPrefix = "";
562
545
  vchasno.directAccess = false;
563
546
  vchasno.needQRCode = false;
564
- vchasno.codeEDRPOU = "41231992";
565
547
 
566
548
  const vchasnoQR = new KSPSettings();
567
- vchasnoQR.id = "vchasnoQR";
549
+ vchasnoQR.id = "VCHASNOQR";
568
550
  vchasnoQR.name = "Вчасно - хмарний підпис (QR)";
569
551
  vchasnoQR.ksp = EndUserConstants.EU_KSP_PB;
570
552
  vchasnoQR.address = "https://cs.vchasno.ua/ss/";
@@ -575,7 +557,7 @@ export function getDefaultKSPs(allowTest) {
575
557
  vchasnoQR.needQRCode = true;
576
558
 
577
559
  const cloudKey = new KSPSettings();
578
- cloudKey.id = "cloudkey";
560
+ cloudKey.id = "CLOUDKEY";
579
561
  cloudKey.name = "ТОВ «ЦСК «Україна» - хмарний підпис CloudKey";
580
562
  cloudKey.ksp = EndUserConstants.EU_KSP_PB;
581
563
  cloudKey.directAccess = true;
@@ -584,29 +566,28 @@ export function getDefaultKSPs(allowTest) {
584
566
  cloudKey.clientIdPrefix = "DIIA_2";
585
567
  cloudKey.confirmationURL = "https://sid.uakey.com.ua/kep?hash=rd/kep";
586
568
  cloudKey.needQRCode = true;
587
- cloudKey.codeEDRPOU = "36865753";
588
569
 
589
570
  const esign = new KSPSettings();
590
- esign.id = "esign";
571
+ esign.id = "ESIGN";
591
572
  esign.name = "ESign - хмарний підпис";
592
573
  esign.ksp = EndUserConstants.EU_KSP_PB;
593
574
  esign.address = "https://cabinet.e-life.com.ua/api/EDG/Sign";
594
575
  esign.clientIdPrefix = "";
595
576
  esign.directAccess = true;
596
577
  esign.needQRCode = false;
597
- esign.codeEDRPOU = "36049014";
598
578
 
599
579
  const smartSignTax = new KSPSettings();
600
- smartSignTax.id = "smartsigntax";
580
+ smartSignTax.id = "SMARTSIGNTAX";
601
581
  smartSignTax.name = "ДПС - хмарний підпис";
602
582
  smartSignTax.ksp = EndUserConstants.EU_KSP_PB;
603
583
  smartSignTax.address = "https://smart-sign.tax.gov.ua/";
604
584
  smartSignTax.port = "443";
605
585
  smartSignTax.directAccess = true;
606
586
  smartSignTax.clientIdType = EndUserKSPClientIdType.Name;
587
+ smartSignTax.needQRCode = false;
607
588
 
608
589
  const pumb = new KSPSettings();
609
- pumb.id = "pumb";
590
+ pumb.id = "PUMB";
610
591
  pumb.name = "ПУМБ - хмарний підпис";
611
592
  pumb.ksp = EndUserConstants.EU_KSP_PB;
612
593
  pumb.address = "https://apiext.pumb.ua/hogsmeade/striga/v1";
@@ -614,15 +595,17 @@ export function getDefaultKSPs(allowTest) {
614
595
  pumb.clientIdPrefix = "SMARTTENDER_";
615
596
  pumb.confirmationURL = "https://www.pumb.ua/qes";
616
597
  pumb.mobileAppName = "";
598
+ pumb.needQRCode = true;
617
599
 
618
600
  const ugb = new KSPSettings();
619
- ugb.id = "ugb";
601
+ ugb.id = "UGB";
620
602
  ugb.name = "Укргазбанк - хмарний підпис «EcoSign»";
621
603
  ugb.ksp = EndUserKSP.VTOKEN;
622
604
  ugb.address = "https://vtms-api-qca.ukrgasbank.com/vtco/api/v1";
623
605
  ugb.systemId = "cihsmVtcoServiceClientSmartTender";
624
606
  ugb.directAccess = true;
625
607
  ugb.clientIdType = EndUserKSPClientIdType.NamePassword;
608
+ ugb.needQRCode = false;
626
609
 
627
610
  const alliance = new KSPSettings();
628
611
  alliance.id = "alliance";
@@ -632,6 +615,7 @@ export function getDefaultKSPs(allowTest) {
632
615
  alliance.systemId = "cihsmVtcoServiceClientSmartTender";
633
616
  alliance.directAccess = true;
634
617
  alliance.clientIdType = EndUserKSPClientIdType.NamePassword;
618
+ alliance.needQRCode = false;
635
619
 
636
620
  const vtoken = new KSPSettings();
637
621
  vtoken.id = "vtoken";
@@ -641,6 +625,64 @@ export function getDefaultKSPs(allowTest) {
641
625
  vtoken.systemId = "cipherVTokenIntegrationClient";
642
626
  vtoken.directAccess = true;
643
627
  vtoken.clientIdType = EndUserKSPClientIdType.NamePassword;
628
+ vtoken.needQRCode = false;
629
+
630
+ const amokey = new KSPSettings();
631
+ amokey.id = "AMOKEY";
632
+ amokey.name = "АМО ФІНТЕХ – хмарний підпис AMOKEY";
633
+ amokey.ksp = EndUserKSP.PB;
634
+ amokey.address = "https://sserver.amokey.com";
635
+ amokey.port = "443";
636
+ amokey.clientIdPrefix = "";
637
+ amokey.directAccess = true;
638
+ amokey.clientIdType = EndUserKSPClientIdType.Name;
639
+ amokey.needQRCode = false;
640
+
641
+ const tascombank = new KSPSettings();
642
+ tascombank.id = "TASCOMBANK";
643
+ tascombank.name = "Сервер підпису КНЕДП АТ \"ТАСКОМБАНК\"";
644
+ tascombank.ksp = EndUserKSP.PB;
645
+ tascombank.address = "https://smartsign.tascombank.ua";
646
+ tascombank.port = "443";
647
+ tascombank.clientIdPrefix = "";
648
+ tascombank.directAccess = true;
649
+ tascombank.clientIdType = EndUserKSPClientIdType.Name;
650
+ tascombank.needQRCode = false;
651
+
652
+ const edinQr = new KSPSettings();
653
+ edinQr.id = "EDINQR";
654
+ edinQr.name = "EDIN ID - хмарний підпис (QR)";
655
+ edinQr.ksp = EndUserKSP.PB;
656
+ edinQr.address = "https://id.edin.ua/api/ess/v1/";
657
+ edinQr.confirmationURL = "https://id.edin.ua/mobile/sign";
658
+ edinQr.port = "";
659
+ edinQr.clientIdPrefix = "EDIN_";
660
+ edinQr.directAccess = true;
661
+ edinQr.mobileAppName = "edinid";
662
+ edinQr.needQRCode = true;
663
+
664
+ const edin = new KSPSettings();
665
+ edin.id = "EDIN";
666
+ edin.name = "EDIN ID - хмарний підпис";
667
+ edin.ksp = EndUserKSP.PB;
668
+ edin.address = "https://id.edin.ua/api/ess/v1/";
669
+ edin.port = "";
670
+ edin.clientIdPrefix = "";
671
+ edin.directAccess = true;
672
+ edin.clientIdType = EndUserKSPClientIdType.Name;
673
+ edin.needQRCode = false;
674
+
675
+ const ukrsibbank = new KSPSettings();
676
+ ukrsibbank.id = "UKRSIBBANK";
677
+ ukrsibbank.name = "УКРСИББАНК - хмарний підпис";
678
+ ukrsibbank.ksp = EndUserKSP.PB;
679
+ ukrsibbank.address = "https://business.ukrsibbank.com/morpheus/smart-sign/";
680
+ ukrsibbank.confirmationURL = "https://business.ukrsibbank.com/smartsign";
681
+ ukrsibbank.port = "";
682
+ ukrsibbank.clientIdPrefix = "USB_";
683
+ ukrsibbank.directAccess = true;
684
+ ukrsibbank.mobileAppName = "UKRSIB business";
685
+ ukrsibbank.needQRCode = true;
644
686
 
645
687
  const ksps = [
646
688
  depositsign,
@@ -653,7 +695,12 @@ export function getDefaultKSPs(allowTest) {
653
695
  smartSignTax,
654
696
  pumb,
655
697
  ugb,
656
- alliance
698
+ alliance,
699
+ amokey,
700
+ tascombank,
701
+ edinQr,
702
+ edin,
703
+ ukrsibbank
657
704
  ];
658
705
 
659
706
  if (allowTest) {
package/src/Utils.js CHANGED
@@ -201,6 +201,7 @@ export function signAlgoToHashAlgo(signAlgo) {
201
201
  case EndUserConstants.EndUserSignAlgo.ECDSAWithSHA:
202
202
  return EndUserConstants.EndUserHashAlgo.SHA256;
203
203
  case EndUserConstants.EndUserSignAlgo.DSTU4145WithGOST34311:
204
+ return EndUserConstants.EndUserHashAlgo.GOST34311;
204
205
  case EndUserConstants.EndUserSignAlgo.DSTU4145WithDSTU7564:
205
206
  return EndUserConstants.EndUserHashAlgo.DSTU7564_256;
206
207
  default: