Skip to content

Instantly share code, notes, and snippets.

@markscottwright
Last active April 16, 2024 20:41
Show Gist options
  • Save markscottwright/d3330f76e89ee5cc0e51c155920285ff to your computer and use it in GitHub Desktop.
Save markscottwright/d3330f76e89ee5cc0e51c155920285ff to your computer and use it in GitHub Desktop.
How to verify a detached pkcs7 signature
# how to verify the signature if you have the CAs certificate. This doesn't seem to work if you specify
# a subordinate CA, even if that CA is the one that issued the cert that created the signature.
openssl smime -verify -inform der -in signature-file -content signed-file -CAfile ca-certificate-in-pem-format
# how to verify everything except the certificate - so the signatures are checked, but no attempt is made
# to verify that the CAs certificate is trusted
openssl smime -verify -noverify -inform der -in signature-file -content signed-file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment