projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Polish shell script to avoid needless complexity.
[openssl.git]
/
test
/
testca
diff --git
a/test/testca
b/test/testca
index d4d01597260dd2d7ba7d4ecb410e09480f24b591..4bcb1fd57680382b219b38c5d9c6c97342f40456 100644
(file)
--- a/
test/testca
+++ b/
test/testca
@@
-1,5
+1,7
@@
#!/bin/sh
#!/bin/sh
+set -e
+
PERL="$1"
if test "$OSTYPE" = msdosdjgpp; then
PERL="$1"
if test "$OSTYPE" = msdosdjgpp; then
@@
-9,35
+11,19
@@
else
fi
export PATH
fi
export PATH
-SSLEAY_CONFIG="-config CAss.cnf"
-export SSLEAY_CONFIG
-
-OPENSSL="`pwd`/../util/opensslwrap.sh"
-export OPENSSL
+export SSLEAY_CONFIG="-config CAss.cnf"
+export OPENSSL="`pwd`/../util/opensslwrap.sh"
/bin/rm -fr demoCA
/bin/rm -fr demoCA
-# Could do '...CA.pl -newca <<EOF || exit 1
-# EOF' but that seems too obscure to me. :)
-OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF
-EOF
-[ $? -eq 0 ] || exit 1
+OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca </dev/null
-SSLEAY_CONFIG="-config Uss.cnf"
-export SSLEAY_CONFIG
-$PERL ../apps/CA.pl -newreq || exit 1
+export SSLEAY_CONFIG="-config Uss.cnf"
+$PERL ../apps/CA.pl -newreq
SSLEAY_CONFIG="-config ../apps/openssl.cnf"
SSLEAY_CONFIG="-config ../apps/openssl.cnf"
-export SSLEAY_CONFIG
-
-# Same comment here.
-$PERL ../apps/CA.pl -sign <<EOF
-y
-y
-EOF
-[ $? -eq 0 ] || exit 1
-
+yes | $PERL ../apps/CA.pl -sign
-$PERL ../apps/CA.pl -verify newcert.pem
|| exit 1
+$PERL ../apps/CA.pl -verify newcert.pem
/bin/rm -fr demoCA newcert.pem newreq.pem
/bin/rm -fr demoCA newcert.pem newreq.pem