Add a demo that reimplements the RSAref glue in form of a dynamically
[openssl.git] / test / tpkcs7
1 #!/bin/sh
2
3 PATH=../apps:$PATH
4 export PATH
5
6 cmd='../apps/openssl pkcs7'
7
8 if [ "$1"x != "x" ]; then
9         t=$1
10 else
11         t=testp7.pem
12 fi
13
14 echo testing pkcs7 conversions
15 cp $t fff.p
16
17 echo "p -> d"
18 $cmd -in fff.p -inform p -outform d >f.d
19 if [ $? != 0 ]; then exit 1; fi
20 echo "p -> p"
21 $cmd -in fff.p -inform p -outform p >f.p
22 if [ $? != 0 ]; then exit 1; fi
23
24 echo "d -> d"
25 $cmd -in f.d -inform d -outform d >ff.d1
26 if [ $? != 0 ]; then exit 1; fi
27 echo "p -> d"
28 $cmd -in f.p -inform p -outform d >ff.d3
29 if [ $? != 0 ]; then exit 1; fi
30
31 echo "d -> p"
32 $cmd -in f.d -inform d -outform p >ff.p1
33 if [ $? != 0 ]; then exit 1; fi
34 echo "p -> p"
35 $cmd -in f.p -inform p -outform p >ff.p3
36 if [ $? != 0 ]; then exit 1; fi
37
38 cmp fff.p f.p
39 if [ $? != 0 ]; then exit 1; fi
40 cmp fff.p ff.p1
41 if [ $? != 0 ]; then exit 1; fi
42 cmp fff.p ff.p3
43 if [ $? != 0 ]; then exit 1; fi
44
45 cmp f.p ff.p1
46 if [ $? != 0 ]; then exit 1; fi
47 cmp f.p ff.p3
48 if [ $? != 0 ]; then exit 1; fi
49
50 /bin/rm -f f.* ff.* fff.*
51 exit 0