30f54ad295
Removed commented-out tests Standardize on doing cmd ... || exit 1 instead of cmd ... if [ $? != 0] ; then exit 1 fi where that if statement has ben one, three, or four lines, variously. Reviewed-by: Richard Levitte <levitte@openssl.org>
43 lines
772 B
Bash
43 lines
772 B
Bash
#!/bin/sh
|
|
|
|
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
|
|
|
|
# Could do '...CA.pl -newca || exot 1 << EOF
|
|
# EOF' but that seems too obscure to me. :)
|
|
OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca <<EOF
|
|
EOF
|
|
[ $? == 0 ] || exit 1
|
|
|
|
SSLEAY_CONFIG="-config Uss.cnf"
|
|
export SSLEAY_CONFIG
|
|
$PERL ../apps/CA.pl -newreq || exit 1
|
|
|
|
SSLEAY_CONFIG="-config ../apps/openssl.cnf"
|
|
export SSLEAY_CONFIG
|
|
|
|
# Same comment here.
|
|
$PERL ../apps/CA.pl -sign <<EOF
|
|
y
|
|
y
|
|
EOF
|
|
[ $? == 0 ] || exit 1
|
|
|
|
|
|
$PERL ../apps/CA.pl -verify newcert.pem || exit 1
|
|
|
|
/bin/rm -fr demoCA newcert.pem newreq.pem
|