]> git.saurik.com Git - apple/security.git/blob - libsecurity_smime/lib/testcms
Security-58286.270.3.0.1.tar.gz
[apple/security.git] / libsecurity_smime / lib / testcms
1 #!/bin/zsh
2
3 test -x ${SECURITY:=~/build/security} || unset SECURITY
4 SECURITY=${SECURITY?must specify the full path to the security command}
5 TMPDIR=/tmp/smime-$$
6 NAME=mb@apple.com
7
8 mkdir $TMPDIR
9 cd $TMPDIR
10
11 $SECURITY cms -O -r $NAME -o content
12 $SECURITY cms -D -i content -o /dev/null
13 $SECURITY cms -D -h 0 -n -i content
14
15 $SECURITY cms -S -N $NAME -Y NONE -i content -o signed
16 $SECURITY cms -D -i signed -o signed.out
17 $SECURITY cms -D -h 0 -n -i signed
18 cmp content signed.out
19
20 $SECURITY cms -S -N $NAME -Y NONE -G -i content -o signed+date
21 $SECURITY cms -D -i signed+date -o signed+date.out
22 $SECURITY cms -D -h 0 -n -i signed+date
23 cmp content signed+date.out
24
25 $SECURITY cms -S -N $NAME -G -P -i content -o signed+smime
26 $SECURITY cms -D -i signed+smime -o signed+smime.out
27 $SECURITY cms -D -h 0 -n -i signed+smime
28 cmp content signed+smime.out
29
30 $SECURITY cms -S -N $NAME -T -Y NONE -i content -o signed+detached
31 $SECURITY cms -D -c content -i signed+detached -o signed+detached.out
32 $SECURITY cms -D -h 0 -n -c content -i signed+detached
33 cmp content signed+detached.out
34
35 $SECURITY cms -S -N $NAME -T -G -P -i content -o signed+detached+smime
36 $SECURITY cms -D -c content -i signed+detached+smime -o signed+detached+smime.out
37 $SECURITY cms -D -h 0 -n -c content -i signed+detached+smime
38 cmp content signed+detached+smime.out
39
40 $SECURITY cms -E -r $NAME -i content -o encrypted
41 $SECURITY cms -D -i encrypted -o encrypted.out
42 $SECURITY cms -D -h 0 -n -i encrypted
43 cmp content encrypted.out