Silence Clang warning about unit'd variable
[openssl.git] / test / testca
index 0e2d05c5720a603d5626e2dd007662e5b503dae5..452558bfc64b013716e8193595d352c5ac08b4b9 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 PERL="$1"
 
 if test "$OSTYPE" = msdosdjgpp; then
@@ -9,42 +11,21 @@ else
 fi
 export PATH
 
-SSLEAY_CONFIG="-config CAss.cnf"
-export SSLEAY_CONFIG
-
-OPENSSL="`pwd`/../util/opensslwrap.sh"
-export OPENSSL
+export SSLEAY_CONFIG OPENSSL
 
 /bin/rm -fr demoCA
-OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF
-EOF
 
-if [ $? != 0 ]; then
-       exit 1;
-fi
+SSLEAY_CONFIG="-config CAss.cnf"
+OPENSSL="`pwd`/../util/opensslwrap.sh"
+
+$PERL ../apps/CA.pl -newca </dev/null
 
 SSLEAY_CONFIG="-config Uss.cnf"
-export SSLEAY_CONFIG
 $PERL ../apps/CA.pl -newreq
-if [ $? != 0 ]; then
-       exit 1;
-fi
-
 
 SSLEAY_CONFIG="-config ../apps/openssl.cnf"
-export SSLEAY_CONFIG
-$PERL ../apps/CA.pl -sign  <<EOF
-y
-y
-EOF
-if [ $? != 0 ]; then
-       exit 1;
-fi
-
+yes | $PERL ../apps/CA.pl -sign
 
 $PERL ../apps/CA.pl -verify newcert.pem
-if [ $? != 0 ]; then
-       exit 1;
-fi
 
 /bin/rm -fr demoCA newcert.pem newreq.pem