Drop CA.sh for CA.pl
[openssl.git] / test / testca
index a28402f9ca79fa2187d1c19b808066637d3c7cd0..0e2d05c5720a603d5626e2dd007662e5b503dae5 100644 (file)
@@ -1,14 +1,22 @@
 #!/bin/sh
 
-SH="/bin/sh"
-PATH=../apps:$PATH
-export SH PATH
+PERL="$1"
+
+if test "$OSTYPE" = msdosdjgpp; then
+    PATH="../apps\;$PATH"
+else
+    PATH="../apps:$PATH"
+fi
+export PATH
 
 SSLEAY_CONFIG="-config CAss.cnf"
 export SSLEAY_CONFIG
 
+OPENSSL="`pwd`/../util/opensslwrap.sh"
+export OPENSSL
+
 /bin/rm -fr demoCA
-$SH ../apps/CA.sh -newca <<EOF
+OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF
 EOF
 
 if [ $? != 0 ]; then
@@ -17,15 +25,15 @@ fi
 
 SSLEAY_CONFIG="-config Uss.cnf"
 export SSLEAY_CONFIG
-$SH ../apps/CA.sh -newreq
+$PERL ../apps/CA.pl -newreq
 if [ $? != 0 ]; then
        exit 1;
 fi
 
 
-SSLEAY_CONFIG="-config ../apps/ssleay.cnf"
+SSLEAY_CONFIG="-config ../apps/openssl.cnf"
 export SSLEAY_CONFIG
-$SH ../apps/CA.sh -sign  <<EOF
+$PERL ../apps/CA.pl -sign  <<EOF
 y
 y
 EOF
@@ -34,11 +42,9 @@ if [ $? != 0 ]; then
 fi
 
 
-$SH ../apps/CA.sh -verify newcert.pem
+$PERL ../apps/CA.pl -verify newcert.pem
 if [ $? != 0 ]; then
        exit 1;
 fi
 
 /bin/rm -fr demoCA newcert.pem newreq.pem
-#usage: CA -newcert|-newreq|-newca|-sign|-verify
-