]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/tsid
Oops, == should really be = when used with test ([ and ]).
[thirdparty/openssl.git] / test / tsid
CommitLineData
d02b48c6
RE
1#!/bin/sh
2
451dc18f
RL
3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
d02b48c6
RE
8export PATH
9
288370ea 10cmd='../apps/openssl sess_id'
d02b48c6
RE
11
12if [ "$1"x != "x" ]; then
13 t=$1
14else
15 t=testsid.pem
16fi
17
18echo testing session-id conversions
19cp $t fff.p
20
21echo "p -> d"
22$cmd -in fff.p -inform p -outform d >f.d
23if [ $? != 0 ]; then exit 1; fi
24#echo "p -> t"
25#$cmd -in fff.p -inform p -outform t >f.t
26#if [ $? != 0 ]; then exit 1; fi
27echo "p -> p"
28$cmd -in fff.p -inform p -outform p >f.p
29if [ $? != 0 ]; then exit 1; fi
30
31echo "d -> d"
32$cmd -in f.d -inform d -outform d >ff.d1
33if [ $? != 0 ]; then exit 1; fi
34#echo "t -> d"
35#$cmd -in f.t -inform t -outform d >ff.d2
36#if [ $? != 0 ]; then exit 1; fi
37echo "p -> d"
38$cmd -in f.p -inform p -outform d >ff.d3
39if [ $? != 0 ]; then exit 1; fi
40
41#echo "d -> t"
42#$cmd -in f.d -inform d -outform t >ff.t1
43#if [ $? != 0 ]; then exit 1; fi
44#echo "t -> t"
45#$cmd -in f.t -inform t -outform t >ff.t2
46#if [ $? != 0 ]; then exit 1; fi
47#echo "p -> t"
48#$cmd -in f.p -inform p -outform t >ff.t3
49#if [ $? != 0 ]; then exit 1; fi
50
51echo "d -> p"
52$cmd -in f.d -inform d -outform p >ff.p1
53if [ $? != 0 ]; then exit 1; fi
54#echo "t -> p"
55#$cmd -in f.t -inform t -outform p >ff.p2
56#if [ $? != 0 ]; then exit 1; fi
57echo "p -> p"
58$cmd -in f.p -inform p -outform p >ff.p3
59if [ $? != 0 ]; then exit 1; fi
60
61cmp fff.p f.p
62if [ $? != 0 ]; then exit 1; fi
63cmp fff.p ff.p1
64if [ $? != 0 ]; then exit 1; fi
65#cmp fff.p ff.p2
66#if [ $? != 0 ]; then exit 1; fi
67cmp fff.p ff.p3
68if [ $? != 0 ]; then exit 1; fi
69
70#cmp f.t ff.t1
71#if [ $? != 0 ]; then exit 1; fi
72#cmp f.t ff.t2
73#if [ $? != 0 ]; then exit 1; fi
74#cmp f.t ff.t3
75#if [ $? != 0 ]; then exit 1; fi
76
77cmp f.p ff.p1
78if [ $? != 0 ]; then exit 1; fi
79#cmp f.p ff.p2
80#if [ $? != 0 ]; then exit 1; fi
81cmp f.p ff.p3
82if [ $? != 0 ]; then exit 1; fi
83
84/bin/rm -f f.* ff.* fff.*
85exit 0