Статус: Участник
Группы: Участники
Зарегистрирован: 21.11.2011(UTC) Сообщений: 27 Откуда: kzn
|
Не проходит проверка подписи в cades.dll, выдает ошибку: "Не удалось построить цепочку для сертификата, на ключе которого подписано сообщение."В режиме x86 подпись и проверка отрабатывает нормально, И тем же самым закрытым в x64 ключом получаем ошибку при при проверке подписи, которую им же сформировали. Лог показывает: Microsoft C++ exception: COleException * __ptr64 at memory location 0x0012f1b8..Эффект проявляется на одной из 2-х тестируемых машин и только в режиме x64, на второй машине все штатно. Указанный ниже лог приведен для подписи в режиме CADES_BES, где сначала производится подпись, а затем проверка. Лог: Цитата: 'test.exe': Loaded '...\cades.dll' 'test.exe': Loaded 'C:\Windows\System32\cryptnet.dll' 'test.exe': Loaded 'C:\Windows\System32\Wldap32.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.asn1_a6d31b994cfcddc4_1.2.298.0_none_69db0dd30af83979\asn1bercpp.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.asn1_a6d31b994cfcddc4_1.2.298.0_none_69db0dd30af83979\asn1bercpp.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.asn1_a6d31b994cfcddc4_1.2.298.0_none_69db0dd30af83979\asn1rtcpp.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.pki.ocsp.client_a6d31b994cfcddc4_1.2.563.0_none_8f9a61b82b264a9d\ocspcli.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.cplib_a6d31b994cfcddc4_1.2.142.0_none_8d48190d841a5d5c\cplib.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.asn1_a6d31b994cfcddc4_1.2.298.0_none_69db0dd30af83979\cpasn1.dll' 'test.exe': Loaded 'C:\Windows\System32\ws2_32.dll' 'test.exe': Loaded 'C:\Windows\System32\nsi.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.asn1_a6d31b994cfcddc4_1.2.298.0_none_69db0dd30af83979\asn1.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.asn1_a6d31b994cfcddc4_1.2.298.0_none_69db0dd30af83979\asn1xercpp.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.pki.ocsp_a6d31b994cfcddc4_1.2.502.0_none_1ba808bbfbf7bb09\ocsp.dll' 'test.exe': Loaded 'C:\Windows\System32\msi.dll' 'test.exe': Loaded 'C:\Windows\System32\shlwapi.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.pki.tsp.client_a6d31b994cfcddc4_1.1.402.0_none_b5a66e3d74ce3944\tspcli.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_cryptopro.pki.tsp_a6d31b994cfcddc4_1.1.356.0_none_7d62d20b40ec6c37\tsp.dll' 'test.exe': Loaded 'C:\Windows\System32\winspool.drv' 'test.exe': Loaded 'C:\Windows\System32\cryptui.dll' 'test.exe': Loaded 'C:\Windows\System32\oleacc.dll' .\Externs.cpp(33) : /Init/ .\CPSettings.cpp(193) : /Init/ .\Externs.cpp(33) : /Init/ .\CPSettings.cpp(193) : /Init/ .\Externs.cpp(33) : /Init/ .\CPSettings.cpp(193) : /Init/ 'test.exe': Loaded 'C:\Windows\System32\riched20.dll' cades.dll: {3084} /CCadesApp::InitInstance/ CadesApp.cpp(16) : hInstance=000000006E000000 SXS: BasepCreateActCtx() BasepSxsCreateStreams() failed cades.dll: {3084} /CadesSignMessage/ cades.cpp(2071) : (pSignPara=0x000000000012FB98, fDetachedSignature=1, cToBeSigned=1, rgpbToBeSigned=0x000000000012FBC8, rgcbToBeSigned=0x000000000012FC28, ppSignedBlob=0x000000000012FBE8) 'test.exe': Loaded 'C:\Windows\System32\userenv.dll' 'test.exe': Loaded 'C:\Windows\System32\profapi.dll' 'test.exe': Loaded 'C:\Windows\System32\cryptsp.dll' 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\cpadvai.dll' 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\cpcsp.dll', Binary was not built with debug information. 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\cpcspi.dll' 'test.exe': Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\comctl32.dll' 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\cpsuprt.dll' 'test.exe': Loaded 'C:\Windows\System32\WinSCard.dll' cpcspi: Thread: file:line function text xcode(dcode) level: 0 'test.exe': Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_a4d6a923711520a9\comctl32.dll' cpcsp: Thread: file:line text level: 0 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\cprndm.dll' 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\bio.dll' 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\cpui.dll' cpui: Thread: file:line function text xcode(dcode) level: 0 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\cprdr.dll' cprdr: Thread: file:line function text xcode(dcode) level: 0 'test.exe': Loaded 'C:\Windows\System32\winsta.dll' 'test.exe': Loaded 'C:\Windows\System32\wtsapi32.dll' First-chance exception at 0x000007fefd98cacd in test.exe: 0x000006BA: Сервер RPC недоступен. First-chance exception at 0x000007fefd98cacd in test.exe: Microsoft C++ exception: unsigned long at memory location 0x0012ce88.. First-chance exception at 0x000007fefd98cacd in test.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.. First-chance exception at 0x000007fefd98cacd in test.exe: Microsoft C++ exception: unsigned long at memory location 0x0012ce88.. First-chance exception at 0x000007fefd98cacd in test.exe: 0x0000071A: Удаленный вызов процедуры был отменен. 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\reg.dll' 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\charismathics.dll', Binary was not built with debug information. 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\etok.dll', Binary was not built with debug information. 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\inpaspot.dll', Binary was not built with debug information. 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\ric.dll' 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\rtSupCP.dll', Binary was not built with debug information. 'test.exe': Loaded 'C:\Windows\System32\shell32.dll' cades.dll: {3084} /CadesSignMessageImpl/ cades.cpp(1953) : Signer updating start cades.dll: {3084} /CadesSignMessageImpl/ cades.cpp(1956) : Hash algorithm deduced cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::AttributeExists/ cades.cpp(181) : (pAttr=0) cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::UpdateSignedAttributes/ cades.cpp(377) : Signer does not have any of signing-certificate attributes cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::UpdateSignedAttributes/ cades.cpp(383) : Attributes copied cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::UpdateSignedAttributes/ cades.cpp(386) : signing-certificate(-v2) attribute assembled cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::UpdateSignedAttributes/ cades.cpp(389) : Signer is updated successfully cades.dll: {3084} /CadesMsgOpenToEncode/ cades.cpp(491) : (dwMsgEncodingType=0x00010001, dwFlags=0x00000004, pvMsgEncodeInfo=0x000000000012E280, pszInnerContentObjID=0, pStreamInfo=0x0000000000000000) cades.dll: {3084} /CadesMsgOpenToEncodeImpl/ cades.cpp(439) : Start cades.dll: {3084} /CadesMsgOpenToEncodeImpl/ cades.cpp(443) : Input parameters checked cades.dll: {3084} /CadesMsgOpenToEncodeImpl/ cades.cpp(452) : Copy of input structures is ready cades.dll: {3084} /CadesMsgOpenToEncodeImpl/ cades.cpp(458) : Signers updating start cades.dll: {3084} /CadesMsgOpenToEncodeImpl/ cades.cpp(463) : Signer #0 'test.exe': Loaded 'C:\Windows\System32\ncrypt.dll' 'test.exe': Loaded 'C:\Windows\System32\bcrypt.dll' 'test.exe': Loaded 'C:\Windows\System32\cryptbase.dll' 'test.exe': Loaded 'C:\Program Files\Crypto Pro\CSP\cpext.dll' SXS: BasepCreateActCtx() BasepSxsCreateStreams() failed cpext: Thread: file:line function text xcode(dcode) level: 0 cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::CheckAlgorithms/ cades.cpp(407) : Public key info is exported successfully cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::CheckAlgorithms/ cades.cpp(414) : Signature algoritm OID info is found: 1.2.643.2.2.3 cades.dll: {3084} /CadesMsgOpenToEncodeImpl/ cades.cpp(470) : Certificates equality checked cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::DeduceHashAlgorithm/ cades.cpp(157) : (szHashAlgorithm=1.2.643.2.2.9) cades.dll: {3084} /CadesMsgOpenToEncodeImpl/ cades.cpp(472) : Hash algorithm deduced cades.dll: {3084} /CadesMsgOpenToEncodeImplNamespace::AttributeExists/ cades.cpp(176) : (pAttr->pszObjId=1.2.840.113549.1.9.16.2.47) cades.dll: {3084} /CadesMsgOpenToEncodeImpl/ cades.cpp(479) : Calling CryptMsgOpenToEncode() 'test.exe': Loaded 'C:\Windows\System32\cpcng.dll' SXS: BasepCreateActCtx() BasepSxsCreateStreams() failed cpcng: Thread: file:line function text xcode(dcode) level: 0 cades.dll: {3084} /CadesMsgOpenToEncode/ cades.cpp(522) : (hMsg=0x000000000037C390, GetLastError=0x00000000) cades.dll: {3084} /CadesMsgEnhanceSignature/ cades.cpp(1148) : (hCryptMsg=0x000000000037D9E0, dwSignatureIndex=0, pCadesSignPara=0x000000000012E240) cades.dll: {3084} /CadesMsgEnhanceSignatureImpl/ cades.cpp(1003) : Input parameters checked cades.dll: {3084} /CadesMsgEnhanceSignatureImpl/ cades.cpp(1007) : Signer certificate ID found cades.dll: {3084} /CadesMsgEnhanceSignatureImpl/ cades.cpp(1022) : pSignerCert=0x0000000000358160 cades.dll: {3084} /CadesMsgEnhanceSignatureImpl/ cades.cpp(1031) : Only CAdES-BES is required. cades.dll: {3084} /CadesMsgEnhanceSignature/ cades.cpp(1177) : (res=1, GetLastError=0x00000000 cades.dll: {3084} /CadesSignMessage/ cades.cpp(2103) : (res=1, GetLastError=0x00000000 cades.dll: {3084} /CadesFreeBlob/ cades.cpp(2537) : (pBlob=0x0000000001E19B20) cades.dll: {3084} /CadesFreeBlob/ cades.cpp(2565) : (res=1, GetLastError=0x00000000 cades.dll: {3084} /CadesVerifyDetachedMessage/ cades.cpp(2444) : (pVerifyPara=0x000000000012FAE8, dwSignerIndex=0, pbDetachedSignBlob=0x0000000001D186F8, cbDetachedSignBlob=543, cToBeSigned=1, rgpbToBeSigned=0x000000000012FB38, rgcbToBeSigned=0x000000000012FC28, ppVerificationInfo=0x000000000012FB18) cades.dll: {3084} /CadesMsgVerifySignature/ cades.cpp(1759) : (hCryptMsg=0x000000000037D9E0, dwSignatureIndex=0, pVerificationPara=0x000000000012F5F8), ppVerificationInfo=0x000000000012FB18) cades.dll: {3084} /CadesMsgVerifySignatureImpl/ cades.cpp(1529) : Input parameters checked cades.dll: {3084} /CadesMsgVerifySignatureImplNamespace::VerifyMessageSignature/ cades.cpp(1432) : Signature verification started cades.dll: {3084} /CadesMsgVerifySignatureImplNamespace::VerifyMessageSignature/ cades.cpp(1442) : Signature verified cades.dll: {3084} /CChainValidationProcess::validateChain/ ChainValidation.h(1063) : #start# cades.dll: {3084} /CChainValidationProcess::buildChain/ ChainValidation.h(1093) : #start# cades.dll: {3084} /CChainWalker::walk/ ChainValidation.h(921) : #start# cades.dll: {3084} /CChainObserverQueue::verifyTime/ ChainValidation.h(288) : #start# cades.dll: {3084} /CChainPolicyVerification::verifyTime/ ChainValidation.h(633) : #start# cades.dll: {3084} /CChainPolicyVerification::verifyTime/ ChainValidation.h(635) : #success# cades.dll: {3084} /CChainObserverQueue::evidenceVerifyTime/ ChainValidation.h(294) : #start# cades.dll: {3084} /CChainObserverQueue::chainContext/ ChainValidation.h(300) : #start# cades.dll: {3084} /CSingleChain::chainContext/ ChainValidation.h(474) : #start# cades.dll: {3084} /CSingleChain::chainContext/ ChainValidation.h(478) : #success# cades.dll: {3084} /CChainStatus::chainContext/ ChainValidation.h(498) : #start# cades.dll: {3084} /CChainStatus::chainContext/ ChainValidation.h(515) : #success# cades.dll: {3084} /CChainPolicyVerification::chainContext/ ChainValidation.h(639) : #start# cades.dll: {3084} /CChainPolicyVerification::chainContext/ ChainValidation.h(652) : #failure# HRESULT: (0x80070002) cades.dll: {3084} /CChainPolicyVerification::chainContext/ ChainValidation.h(652) : CertVerifyCertificateChainPolicy() 'test.exe': Loaded 'C:\Windows\System32\gpapi.dll' cades.dll: {3084} /CadesMsgVerifySignatureImpl/ cades.cpp(1740) : Exception thrown: _hr First-chance exception at 0x000007fefd98cacd in test.exe: Microsoft C++ exception: COleException * __ptr64 at memory location 0x0012ebb8.. cades.dll: {3084} /CadesMsgVerifySignature/ cades.cpp(1778) : COleException, m_sc=0x80070002 cades.dll: {3084} /CadesMsgVerifySignature/ cades.cpp(1790) : (res=0, GetLastError=0x80070002 cades.dll: {3084} /CadesVerifyMessageImplNamespace::VerifyOpenedMessageSignature/ cades.cpp(2250) : Expression FAILED: ::CadesMsgVerifySignature(msg.GetHandle(), dwSignerIndex, pCadesVerifyPara, ppVerificationInfo) cades.dll: {3084} /CadesVerifyMessageImplNamespace::VerifyOpenedMessageSignature/ cades.cpp(2250) : Last win32 error thrown as exception First-chance exception at 0x000007fefd98cacd in test.exe: Microsoft C++ exception: COleException * __ptr64 at memory location 0x0012f1b8.. cades.dll: {3084} /CadesVerifyDetachedMessage/ cades.cpp(2465) : COleException, m_sc=0x80070002 cades.dll: {3084} /CadesVerifyDetachedMessage/ cades.cpp(2477) : (res=0, GetLastError=0x80070002 cades.dll: {3084} /CadesFreeVerificationInfo/ cades.cpp(2493) : (pVerificationInfo=0x0000000001E19BF0) cades.dll: {3084} /CadesFreeVerificationInfo/ cades.cpp(2521) : (res=1, GetLastError=0x80070002 First-chance exception at 0x000007fefd98cacd in test.exe: Microsoft C++ exception: Exception at memory location 0x0012fb80..
|