Various cleanups and fixed by Marc and Ralf to start the OpenTLS project
[openssl.git] / test / testca
1 #!/bin/sh
2
3 SH="/bin/sh"
4 PATH=../apps:$PATH
5 export SH PATH
6
7 SSLEAY_CONFIG="-config CAss.cnf"
8 export SSLEAY_CONFIG
9
10 /bin/rm -fr demoCA
11 $SH ../apps/CA.sh -newca <<EOF
12 EOF
13
14 if [ $? != 0 ]; then
15         exit 1;
16 fi
17
18 SSLEAY_CONFIG="-config Uss.cnf"
19 export SSLEAY_CONFIG
20 $SH ../apps/CA.sh -newreq
21 if [ $? != 0 ]; then
22         exit 1;
23 fi
24
25
26 SSLEAY_CONFIG="-config ../apps/ssleay.cnf"
27 export SSLEAY_CONFIG
28 $SH ../apps/CA.sh -sign  <<EOF
29 y
30 y
31 EOF
32 if [ $? != 0 ]; then
33         exit 1;
34 fi
35
36
37 $SH ../apps/CA.sh -verify newcert.pem
38 if [ $? != 0 ]; then
39         exit 1;
40 fi
41
42 /bin/rm -fr demoCA newcert.pem newreq.pem
43 #usage: CA -newcert|-newreq|-newca|-sign|-verify
44