aboutsummaryrefslogtreecommitdiff
path: root/smime-signature.sh
diff options
context:
space:
mode:
Diffstat (limited to 'smime-signature.sh')
-rwxr-xr-xsmime-signature.sh24
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
v class='alt'>
34f3228

8f9c3d1
32a7c74
0b8820c
8f9c3d1
f210238
17da006
abd5caf

65f6634
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25