added verfification

This commit is contained in:
German Arutyunov 2021-03-23 16:14:57 +03:00
parent 4096e085a1
commit 17e248e495
4 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,7 @@ const executionFlow = {
propset_ContentEncoding: jest.fn(), propset_ContentEncoding: jest.fn(),
propset_Content: jest.fn(), propset_Content: jest.fn(),
SignCades: jest.fn(() => executionSteps[4]), SignCades: jest.fn(() => executionSteps[4]),
VerifyCades: jest.fn(),
CoSignCades: jest.fn(() => executionSteps[5]), CoSignCades: jest.fn(() => executionSteps[5]),
}, },
[executionSteps[2]]: { [executionSteps[2]]: {

View File

@ -72,6 +72,7 @@ export const addAttachedSignature = _afterPluginsLoaded(
let signature: string; let signature: string;
try { try {
void (__cadesAsyncToken__ + cadesSignedData.VerifyCades(messageBase64, cadesplugin.CADESCOM_PKCS7_TYPE));
signature = __cadesAsyncToken__ + cadesSignedData.CoSignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE); signature = __cadesAsyncToken__ + cadesSignedData.CoSignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);
} catch (error) { } catch (error) {
console.error(error); console.error(error);

View File

@ -32,6 +32,7 @@ const executionFlow = {
propset_ContentEncoding: jest.fn(), propset_ContentEncoding: jest.fn(),
propset_Content: jest.fn(), propset_Content: jest.fn(),
SignHash: jest.fn(() => executionSteps[4]), SignHash: jest.fn(() => executionSteps[4]),
VerifyCades: jest.fn(),
CoSignHash: jest.fn(() => executionSteps[6]), CoSignHash: jest.fn(() => executionSteps[6]),
}, },
[executionSteps[2]]: { [executionSteps[2]]: {

View File

@ -74,6 +74,7 @@ export const addDetachedSignature = _afterPluginsLoaded(
let signature: string; let signature: string;
try { try {
void (__cadesAsyncToken__ + cadesSignedData.VerifyCades(cadesHashedData, cadesplugin.CADESCOM_PKCS7_TYPE));
signature = signature =
__cadesAsyncToken__ + __cadesAsyncToken__ +
cadesSignedData.CoSignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE); cadesSignedData.CoSignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);