@it-enterprise/digital-signature 1.3.18 → 1.3.19

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.18",
3
+ "version": "1.3.19",
4
4
  "description": "digital signature",
5
5
  "private": false,
6
6
  "main": "src/index.js",
package/src/GlSign.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-magic-numbers */
2
2
 
3
- import { EndUserSignAlgo } from "../euscp/EndUserConstants";
3
+ import { EndUserConstants } from "../euscp/euscp";
4
4
  import { EU_KSP_DIIA, EU_KSP_GRYADA, getDefaultKSPs } from "./Models";
5
5
  import { convertFromBase64, IS_DSTU_7564_DAY } from "./Utils";
6
6
 
@@ -104,9 +104,9 @@ export default class GlSign {
104
104
  this.KSPs.forEach(element => {
105
105
  if (element.ksp === EU_KSP_DIIA || element.address.includes("acsk.privatbank.ua/cloud") || element.address.includes("cs.vchasno.ua")) {
106
106
  if (IS_DSTU_7564_DAY()) {
107
- element.signAlgos = [ EndUserSignAlgo.DSTU4145WithDSTU7564 ];
107
+ element.signAlgos = [ EndUserConstants.EndUserSignAlgo.DSTU4145WithDSTU7564 ];
108
108
  } else {
109
- element.signAlgos = [ EndUserSignAlgo.DSTU4145WithGOST34311 ];
109
+ element.signAlgos = [ EndUserConstants.EndUserSignAlgo.DSTU4145WithGOST34311 ];
110
110
  }
111
111
  }
112
112
  // if (element.ksp === EU_KSP_GRYADA) {
package/src/Models.js CHANGED
@@ -1,4 +1,3 @@
1
- import { EndUserHashAlgo, EndUserSignAlgo } from "../euscp/EndUserConstants";
2
1
  import { EndUserCertificate, EndUserError, EndUserOwnerInfo, EndUserConstants, KSPSettings, EndUser, EndUserTaxReport } from "../euscp/euscp";
3
2
  import GlSign from "./GlSign";
4
3
  import { downloadData, arrayToBase64, base64ToArray, signAlgoToHashAlgo, getSupportedSignAlgos, IS_DSTU_7564_DAY } from "./Utils";
@@ -419,9 +418,9 @@ export class PrivateKeyInfo {
419
418
  if (this.keyType === DigitalSignatureKeyTypeKSP) {
420
419
  if (this.ksp.ksp === EU_KSP_DIIA || this.ksp.address.includes("acsk.privatbank.ua/cloud") || this.ksp.address.includes("cs.vchasno.ua")) {
421
420
  if (IS_DSTU_7564_DAY()) {
422
- return EndUserSignAlgo.DSTU4145WithDSTU7564;
421
+ return EndUserConstants.EndUserSignAlgo.DSTU4145WithDSTU7564;
423
422
  } else {
424
- return EndUserSignAlgo.DSTU4145WithGOST34311;
423
+ return EndUserConstants.DSTU4145WithGOST34311;
425
424
  }
426
425
  }
427
426
  // if (this.ksp.ksp === EU_KSP_GRYADA) {
@@ -445,14 +444,14 @@ export class PrivateKeyInfo {
445
444
  if (this.keyType === DigitalSignatureKeyTypeKSP) {
446
445
  if (this.ksp.ksp === EU_KSP_DIIA || this.ksp.address.includes("acsk.privatbank.ua/cloud") || this.ksp.address.includes("cs.vchasno.ua")) {
447
446
  if (IS_DSTU_7564_DAY()) {
448
- return EndUserHashAlgo.DSTU7564_256;
447
+ return EndUserConstants.EndUserHashAlgo.DSTU7564_256;
449
448
  } else {
450
- return EndUserHashAlgo.GOST34311;
449
+ return EndUserConstants.EndUserHashAlgo.GOST34311;
451
450
  }
452
451
  }
453
- if (this.ksp.ksp === EU_KSP_GRYADA) {
454
- return glsign?.HashAlgorithm !== "GOST34311" ? EndUserHashAlgo.DSTU7564_256 : EndUserHashAlgo.GOST34311;
455
- }
452
+ // if (this.ksp.ksp === EU_KSP_GRYADA) {
453
+ // return glsign?.HashAlgorithm !== "GOST34311" ? EndUserConstants.EndUserHashAlgo.DSTU7564_256 : EndUserConstants.EndUserHashAlgo.GOST34311;
454
+ // }
456
455
 
457
456
  return EndUserConstants.EndUserHashAlgo.GOST34311;
458
457
  }