OpenSSL failed to verify cms document

Yehor Semeniaka ega.semenyaka at gmail.com
Tue Jan 3 14:36:57 UTC 2023


Hello, OpenSSL community,

I faced the problem and can't find any solution or explanation for this
problem. I have built CMS file with Botan library tools, and my CMS
document looks exactly the same as the document generated with *openssl cms
-sign* command except for a signing time and the signature.

I have separately verified the signature with openssl command:
*openssl dgst -sha256 -verify pub_key.pem -signature signature.txt
signer_attributes.txt*
And the output was: Verified OK

But I can't verify the CMS document itself with the command:
*openssl cms -verify -CAfile ca_test.crt -inform der -signer cert.crt -in
cms.p7b*

I am getting error:
70288:error:04091068:rsa routines:int_rsa_verify:bad
signature:../openssl-1.1.1l/crypto/rsa/rsa_sign.c:220:
70288:error:2E09809E:CMS routines:CMS_SignerInfo_verify:verification
failure:../openssl-1.1.1l/crypto/cms/cms_sd.c:767:

ssl version is 1.1.1l

Thank you in advance for any help!

Regards,
---------------------------------------

*Yehor SEMENIAKA*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20230103/152896a4/attachment.htm>


More information about the openssl-users mailing list