How to extract pkcs7 envelop contents and verify digital signature?
I want to verify the digital signature of the pkcs7 envelop . PKCS7 e开发者_开发问答nvelop has message content,signer certificate, signature in it. How to extract this parts ? And how to verify digital signature ?
Also I want to check the authenticity of the signer certificate which is a x509 digital certificate .
If you have the PKCS7 message in an OpenSSL PKCS7 *
object, you can simply use PKCS7_verify()
. It will verify the signature and the certificate using the supplied trusted certificate store.
If the message is in S/MIME
format, the SMIME_read_PKCS7()
function can be used to turn it into a PKCS7 *
object.
精彩评论