1998-12-21 18:52:47 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-04-11 00:25:30 +08:00
|
|
|
set -e
|
|
|
|
|
2015-04-09 02:07:39 +08:00
|
|
|
PERL="$1"
|
|
|
|
|
2002-06-14 04:42:35 +08:00
|
|
|
if test "$OSTYPE" = msdosdjgpp; then
|
2005-02-02 07:48:37 +08:00
|
|
|
PATH="../apps\;$PATH"
|
2002-06-14 04:42:35 +08:00
|
|
|
else
|
2005-02-02 07:48:37 +08:00
|
|
|
PATH="../apps:$PATH"
|
2002-06-14 04:42:35 +08:00
|
|
|
fi
|
2015-04-09 02:07:39 +08:00
|
|
|
export PATH
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-04-17 13:06:46 +08:00
|
|
|
export SSLEAY_CONFIG OPENSSL
|
2005-02-02 07:48:37 +08:00
|
|
|
|
1998-12-21 18:52:47 +08:00
|
|
|
/bin/rm -fr demoCA
|
2015-04-10 22:06:17 +08:00
|
|
|
|
2015-04-17 13:06:46 +08:00
|
|
|
SSLEAY_CONFIG="-config CAss.cnf"
|
|
|
|
OPENSSL="`pwd`/../util/opensslwrap.sh"
|
|
|
|
|
2015-04-11 00:25:30 +08:00
|
|
|
OPENSSL_CONFIG=/dev/null $PERL ../apps/CA.pl -newca </dev/null
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-04-17 13:06:46 +08:00
|
|
|
SSLEAY_CONFIG="-config Uss.cnf"
|
2015-04-11 00:25:30 +08:00
|
|
|
$PERL ../apps/CA.pl -newreq
|
1998-12-21 18:52:47 +08:00
|
|
|
|
1999-01-03 03:01:41 +08:00
|
|
|
SSLEAY_CONFIG="-config ../apps/openssl.cnf"
|
2015-04-11 00:25:30 +08:00
|
|
|
yes | $PERL ../apps/CA.pl -sign
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2015-04-11 00:25:30 +08:00
|
|
|
$PERL ../apps/CA.pl -verify newcert.pem
|
1998-12-21 18:52:47 +08:00
|
|
|
|
|
|
|
/bin/rm -fr demoCA newcert.pem newreq.pem
|