Include TA in checks/callback with partial chains.
[openssl.git] / test / tpkcs7
1 #!/bin/sh
2
3 cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7'
4
5 if [ "$1"x != "x" ]; then
6         t=$1
7 else
8         t=testp7.pem
9 fi
10
11 echo testing pkcs7 conversions
12 cp $t p7-fff.p
13
14 echo "p -> d"
15 $cmd -in p7-fff.p -inform p -outform d >p7-f.d
16 if [ $? != 0 ]; then exit 1; fi
17 echo "p -> p"
18 $cmd -in p7-fff.p -inform p -outform p >p7-f.p
19 if [ $? != 0 ]; then exit 1; fi
20
21 echo "d -> d"
22 $cmd -in p7-f.d -inform d -outform d >p7-ff.d1
23 if [ $? != 0 ]; then exit 1; fi
24 echo "p -> d"
25 $cmd -in p7-f.p -inform p -outform d >p7-ff.d3
26 if [ $? != 0 ]; then exit 1; fi
27
28 echo "d -> p"
29 $cmd -in p7-f.d -inform d -outform p >p7-ff.p1
30 if [ $? != 0 ]; then exit 1; fi
31 echo "p -> p"
32 $cmd -in p7-f.p -inform p -outform p >p7-ff.p3
33 if [ $? != 0 ]; then exit 1; fi
34
35 cmp p7-fff.p p7-f.p
36 if [ $? != 0 ]; then exit 1; fi
37 cmp p7-fff.p p7-ff.p1
38 if [ $? != 0 ]; then exit 1; fi
39 cmp p7-fff.p p7-ff.p3
40 if [ $? != 0 ]; then exit 1; fi
41
42 cmp p7-f.p p7-ff.p1
43 if [ $? != 0 ]; then exit 1; fi
44 cmp p7-f.p p7-ff.p3
45 if [ $? != 0 ]; then exit 1; fi
46
47 /bin/rm -f p7-f.* p7-ff.* p7-fff.*
48 exit 0