Polish shell script to avoid needless complexity.
[openssl.git] / test / testca
1 #!/bin/sh
2
3 set -e
4
5 PERL="$1"
6
7 if test "$OSTYPE" = msdosdjgpp; then
8     PATH="../apps\;$PATH"
9 else
10     PATH="../apps:$PATH"
11 fi
12 export PATH
13
14 export SSLEAY_CONFIG="-config CAss.cnf"
15 export OPENSSL="`pwd`/../util/opensslwrap.sh"
16
17 /bin/rm -fr demoCA
18
19 OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca </dev/null
20
21 export SSLEAY_CONFIG="-config Uss.cnf"
22 $PERL ../apps/CA.pl -newreq
23
24 SSLEAY_CONFIG="-config ../apps/openssl.cnf"
25 yes | $PERL ../apps/CA.pl -sign
26
27 $PERL ../apps/CA.pl -verify newcert.pem
28
29 /bin/rm -fr demoCA newcert.pem newreq.pem