@it-enterprise/digital-signature 1.3.16 → 1.3.17
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 +1 -13
package/package.json
CHANGED
package/src/DigitalSignature.js
CHANGED
|
@@ -817,19 +817,7 @@ export default class DigitalSignature {
|
|
|
817
817
|
message: this._resourses.BadParameter + " data"
|
|
818
818
|
};
|
|
819
819
|
}
|
|
820
|
-
|
|
821
|
-
const cert = Array.isArray(signerInfo) ? signerInfo[0] : signerInfo;
|
|
822
|
-
let hashAlgo = cert.infoEx.certHashType || signAlgoToHashAlgo(cert.infoEx.publicKeyType);
|
|
823
|
-
|
|
824
|
-
if (hashAlgo === EndUserConstants.EndUserCertHashType.GOST34311 && this._glSign.HashAlgorithm !== "GOST34311") {
|
|
825
|
-
hashAlgo = EndUserConstants.EndUserHashAlgo.DSTU7564_256;
|
|
826
|
-
}
|
|
827
|
-
if (hashAlgo === EndUserConstants.EndUserCertHashType.DSTU7564_256 && this._glSign.HashAlgorithm === "GOST34311") {
|
|
828
|
-
hashAlgo = EndUserConstants.EndUserHashAlgo.GOST34311;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
const hash = await this._euSign.HashData(hashAlgo, data);
|
|
832
|
-
return await this._euSign.VerifyHash(hash.val || hash, sign.val || sign, signIndex);
|
|
820
|
+
return await this._euSign.VerifyData(data.val || data, sign.val || sign, signIndex);
|
|
833
821
|
} else {
|
|
834
822
|
return await this._euSign.VerifyDataInternal(sign.val || sign, signIndex);
|
|
835
823
|
}
|