import libssl (LibreSSL 2.5.4)
[unleashed.git] / lib / libssl / test / testca
blobb109cfe271f329919b1f0cb3521ddb63da6f957d
1 #!/bin/sh
3 SH="/bin/sh"
4 if test "$OSTYPE" = msdosdjgpp; then
5 PATH="../apps\;$PATH"
6 else
7 PATH="../apps:$PATH"
8 fi
9 export SH PATH
11 SSLEAY_CONFIG="-config CAss.cnf"
12 export SSLEAY_CONFIG
14 OPENSSL="`pwd`/../util/opensslwrap.sh"
15 export OPENSSL
17 /bin/rm -fr demoCA
18 $SH ../apps/CA.sh -newca <<EOF
19 EOF
21 if [ $? != 0 ]; then
22 exit 1;
25 SSLEAY_CONFIG="-config Uss.cnf"
26 export SSLEAY_CONFIG
27 $SH ../apps/CA.sh -newreq
28 if [ $? != 0 ]; then
29 exit 1;
33 SSLEAY_CONFIG="-config ../apps/openssl.cnf"
34 export SSLEAY_CONFIG
35 $SH ../apps/CA.sh -sign <<EOF
38 EOF
39 if [ $? != 0 ]; then
40 exit 1;
44 $SH ../apps/CA.sh -verify newcert.pem
45 if [ $? != 0 ]; then
46 exit 1;
49 /bin/rm -fr demoCA newcert.pem newreq.pem
50 #usage: CA -newcert|-newreq|-newca|-sign|-verify