openssl/test/testca
Viktor Dukhovni 34b0a927ab Polish shell script to avoid needless complexity.
No need for here documents, just use "yes" or </dev/null.
No need for "|| exit 1" clauses, just use "set -e".

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-10 12:28:07 -04:00

29 lines
538 B
Bash

#!/bin/sh
set -e
PERL="$1"
if test "$OSTYPE" = msdosdjgpp; then
PATH="../apps\;$PATH"
else
PATH="../apps:$PATH"
fi
export PATH
export SSLEAY_CONFIG="-config CAss.cnf"
export OPENSSL="`pwd`/../util/opensslwrap.sh"
/bin/rm -fr demoCA
OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca </dev/null
export SSLEAY_CONFIG="-config Uss.cnf"
$PERL ../apps/CA.pl -newreq
SSLEAY_CONFIG="-config ../apps/openssl.cnf"
yes | $PERL ../apps/CA.pl -sign
$PERL ../apps/CA.pl -verify newcert.pem
/bin/rm -fr demoCA newcert.pem newreq.pem