openssl/test/testca
Rich Salz e71cecd551 fix to "test script cleanup"
Fix commit 30f54ad295d58ff8c6d28c1fd612d23c2c343d19 which used
non-portable syntax for checking exit status.

Reviewed-by: Matt Caswell <matt@openssl.org>
2015-04-10 11:40:25 -04:00

44 lines
773 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 <<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
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
[ $? -eq 0 ] || exit 1
$PERL ../apps/CA.pl -verify newcert.pem || exit 1
/bin/rm -fr demoCA newcert.pem newreq.pem