diff options
Diffstat (limited to 'smime-signature.sh')
-rwxr-xr-x | smime-signature.sh | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/smime-signature.sh b/smime-signature.sh index fb2f815..7b58bf4 100755 --- a/smime-signature.sh +++ b/smime-signature.sh @@ -4,29 +4,11 @@ set -x -openssl req -batch -new -engine pkcs11 -keyform ENGINE -x509 -days 365 \ - -subj "/C=PV/O=Pottsylvanian Ministry of Offense/GN=Fearless/SN=Leader" \ - -key label_leader -out leader.cer - -openssl req -batch -new -engine pkcs11 -keyform ENGINE \ - -subj "/GN=Natasha/SN=Fatale" \ - -key label_natasha | -openssl x509 -req -engine pkcs11 -CAkeyform ENGINE -days 60 \ - -set_serial `date +%s` -extfile $OPENSSL_CONF -extensions ext_ee \ - -CAkey label_leader -CA leader.cer \ - -out natasha.cer - -openssl req -batch -new -engine pkcs11 -keyform ENGINE \ - -subj "/GN=Boris/SN=Badenov" \ - -key label_boris | -openssl x509 -req -engine pkcs11 -CAkeyform ENGINE -days 60 \ - -set_serial `date +%s` -extfile $OPENSSL_CONF -extensions ext_ee \ - -CAkey label_leader -CA leader.cer \ - -out boris.cer - openssl smime -engine pkcs11 -sign -text -keyform ENGINE \ - -inkey label_natasha -signer natasha.cer -certfile leader.cer \ + -inkey label_natasha -signer natasha.cer \ -from "Natasha Fatale <natasha@moo.pv>" \ -to "Boris Badenov <boris@moo.pv>" \ -subject "Fiendish plot" \ -in message.txt -out message.smime + +openssl smime -verify -in message.smime -CAfile leader.cer -out /dev/null |