@it-enterprise/digital-signature 1.3.14 → 1.3.15
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 +1 -1
- package/src/DigitalSignature.js +6 -1
package/package.json
CHANGED
package/src/DigitalSignature.js
CHANGED
|
@@ -818,7 +818,12 @@ export default class DigitalSignature {
|
|
|
818
818
|
}
|
|
819
819
|
const signerInfo = await this._euSign.GetSigner(sign, signIndex, false);
|
|
820
820
|
const cert = Array.isArray(signerInfo) ? signerInfo[0] : signerInfo;
|
|
821
|
-
|
|
821
|
+
let hashAlgo = cert.infoEx.certHashType || signAlgoToHashAlgo(cert.infoEx.publicKeyType);
|
|
822
|
+
|
|
823
|
+
if (hashAlgo === EndUserConstants.EndUserCertHashType.GOST34311 && this._glSign.HashAlgorithm !== "GOST34311") {
|
|
824
|
+
hashAlgo = EndUserConstants.EndUserHashAlgo.DSTU7564_256;
|
|
825
|
+
}
|
|
826
|
+
|
|
822
827
|
const hash = await this._euSign.HashData(hashAlgo, data);
|
|
823
828
|
return await this._euSign.VerifyHash(hash.val || hash, sign.val || sign, signIndex);
|
|
824
829
|
} else {
|