Created
July 25, 2017 07:28
-
-
Save aduzsardi/0a016b56978a138169b95754b7a7855c to your computer and use it in GitHub Desktop.
extract files from p7s attachments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
openssl pkcs7 -inform DER -in "$1" -print_certs -out "$1.pem" | |
openssl smime -verify -in "$1" -inform der -noverify -signer "$1.pem" -out "$1.pdf" 2>/dev/null | |
rm "$1.pem" | |
evince "$1.pdf" | |
rm "$1.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment