~ubuntu-branches/ubuntu/precise/openssl098/precise

« back to all changes in this revision

Viewing changes to test/tx509

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2011-03-23 19:50:31 UTC
  • Revision ID: james.westby@ubuntu.com-20110323195031-6h9crj4bymhhr8b8
Tags: upstream-0.9.8o
ImportĀ upstreamĀ versionĀ 0.9.8o

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
cmd='../util/shlib_wrap.sh ../apps/openssl x509'
 
4
 
 
5
if [ "$1"x != "x" ]; then
 
6
        t=$1
 
7
else
 
8
        t=testx509.pem
 
9
fi
 
10
 
 
11
echo testing X509 conversions
 
12
cp $t fff.p
 
13
 
 
14
echo "p -> d"
 
15
$cmd -in fff.p -inform p -outform d >f.d
 
16
if [ $? != 0 ]; then exit 1; fi
 
17
echo "p -> n"
 
18
$cmd -in fff.p -inform p -outform n >f.n
 
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 "n -> d"
 
28
$cmd -in f.n -inform n -outform d >ff.d2
 
29
if [ $? != 0 ]; then exit 1; fi
 
30
echo "p -> d"
 
31
$cmd -in f.p -inform p -outform d >ff.d3
 
32
if [ $? != 0 ]; then exit 1; fi
 
33
 
 
34
echo "d -> n"
 
35
$cmd -in f.d -inform d -outform n >ff.n1
 
36
if [ $? != 0 ]; then exit 1; fi
 
37
echo "n -> n"
 
38
$cmd -in f.n -inform n -outform n >ff.n2
 
39
if [ $? != 0 ]; then exit 1; fi
 
40
echo "p -> n"
 
41
$cmd -in f.p -inform p -outform n >ff.n3
 
42
if [ $? != 0 ]; then exit 1; fi
 
43
 
 
44
echo "d -> p"
 
45
$cmd -in f.d -inform d -outform p >ff.p1
 
46
if [ $? != 0 ]; then exit 1; fi
 
47
echo "n -> p"
 
48
$cmd -in f.n -inform n -outform p >ff.p2
 
49
if [ $? != 0 ]; then exit 1; fi
 
50
echo "p -> p"
 
51
$cmd -in f.p -inform p -outform p >ff.p3
 
52
if [ $? != 0 ]; then exit 1; fi
 
53
 
 
54
cmp fff.p f.p
 
55
if [ $? != 0 ]; then exit 1; fi
 
56
cmp fff.p ff.p1
 
57
if [ $? != 0 ]; then exit 1; fi
 
58
cmp fff.p ff.p2
 
59
if [ $? != 0 ]; then exit 1; fi
 
60
cmp fff.p ff.p3
 
61
if [ $? != 0 ]; then exit 1; fi
 
62
 
 
63
cmp f.n ff.n1
 
64
if [ $? != 0 ]; then exit 1; fi
 
65
cmp f.n ff.n2
 
66
if [ $? != 0 ]; then exit 1; fi
 
67
cmp f.n ff.n3
 
68
if [ $? != 0 ]; then exit 1; fi
 
69
 
 
70
cmp f.p ff.p1
 
71
if [ $? != 0 ]; then exit 1; fi
 
72
cmp f.p ff.p2
 
73
if [ $? != 0 ]; then exit 1; fi
 
74
cmp f.p ff.p3
 
75
if [ $? != 0 ]; then exit 1; fi
 
76
 
 
77
/bin/rm -f f.* ff.* fff.*
 
78
exit 0