Import OpenSSL-0.9.8i.
[dragonfly.git] / crypto / openssl-0.9.7e / test / tx509
blobd380963abce538fd5427073e49283b10e7fc6137
1 #!/bin/sh
3 if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5 else
6 PATH=../apps:$PATH
7 fi
8 export PATH
10 cmd='../apps/openssl x509'
12 if [ "$1"x != "x" ]; then
13 t=$1
14 else
15 t=testx509.pem
18 echo testing X509 conversions
19 cp $t fff.p
21 echo "p -> d"
22 $cmd -in fff.p -inform p -outform d >f.d
23 if [ $? != 0 ]; then exit 1; fi
24 echo "p -> n"
25 $cmd -in fff.p -inform p -outform n >f.n
26 if [ $? != 0 ]; then exit 1; fi
27 echo "p -> p"
28 $cmd -in fff.p -inform p -outform p >f.p
29 if [ $? != 0 ]; then exit 1; fi
31 echo "d -> d"
32 $cmd -in f.d -inform d -outform d >ff.d1
33 if [ $? != 0 ]; then exit 1; fi
34 echo "n -> d"
35 $cmd -in f.n -inform n -outform d >ff.d2
36 if [ $? != 0 ]; then exit 1; fi
37 echo "p -> d"
38 $cmd -in f.p -inform p -outform d >ff.d3
39 if [ $? != 0 ]; then exit 1; fi
41 echo "d -> n"
42 $cmd -in f.d -inform d -outform n >ff.n1
43 if [ $? != 0 ]; then exit 1; fi
44 echo "n -> n"
45 $cmd -in f.n -inform n -outform n >ff.n2
46 if [ $? != 0 ]; then exit 1; fi
47 echo "p -> n"
48 $cmd -in f.p -inform p -outform n >ff.n3
49 if [ $? != 0 ]; then exit 1; fi
51 echo "d -> p"
52 $cmd -in f.d -inform d -outform p >ff.p1
53 if [ $? != 0 ]; then exit 1; fi
54 echo "n -> p"
55 $cmd -in f.n -inform n -outform p >ff.p2
56 if [ $? != 0 ]; then exit 1; fi
57 echo "p -> p"
58 $cmd -in f.p -inform p -outform p >ff.p3
59 if [ $? != 0 ]; then exit 1; fi
61 cmp fff.p f.p
62 if [ $? != 0 ]; then exit 1; fi
63 cmp fff.p ff.p1
64 if [ $? != 0 ]; then exit 1; fi
65 cmp fff.p ff.p2
66 if [ $? != 0 ]; then exit 1; fi
67 cmp fff.p ff.p3
68 if [ $? != 0 ]; then exit 1; fi
70 cmp f.n ff.n1
71 if [ $? != 0 ]; then exit 1; fi
72 cmp f.n ff.n2
73 if [ $? != 0 ]; then exit 1; fi
74 cmp f.n ff.n3
75 if [ $? != 0 ]; then exit 1; fi
77 cmp f.p ff.p1
78 if [ $? != 0 ]; then exit 1; fi
79 cmp f.p ff.p2
80 if [ $? != 0 ]; then exit 1; fi
81 cmp f.p ff.p3
82 if [ $? != 0 ]; then exit 1; fi
84 /bin/rm -f f.* ff.* fff.*
85 exit 0