Drop CA.sh for CA.pl
[openssl.git] / test / testca
1 #!/bin/sh
2
3 PERL="$1"
4
5 if test "$OSTYPE" = msdosdjgpp; then
6     PATH="../apps\;$PATH"
7 else
8     PATH="../apps:$PATH"
9 fi
10 export PATH
11
12 SSLEAY_CONFIG="-config CAss.cnf"
13 export SSLEAY_CONFIG
14
15 OPENSSL="`pwd`/../util/opensslwrap.sh"
16 export OPENSSL
17
18 /bin/rm -fr demoCA
19 OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF
20 EOF
21
22 if [ $? != 0 ]; then
23         exit 1;
24 fi
25
26 SSLEAY_CONFIG="-config Uss.cnf"
27 export SSLEAY_CONFIG
28 $PERL ../apps/CA.pl -newreq
29 if [ $? != 0 ]; then
30         exit 1;
31 fi
32
33
34 SSLEAY_CONFIG="-config ../apps/openssl.cnf"
35 export SSLEAY_CONFIG
36 $PERL ../apps/CA.pl -sign  <<EOF
37 y
38 y
39 EOF
40 if [ $? != 0 ]; then
41         exit 1;
42 fi
43
44
45 $PERL ../apps/CA.pl -verify newcert.pem
46 if [ $? != 0 ]; then
47         exit 1;
48 fi
49
50 /bin/rm -fr demoCA newcert.pem newreq.pem