1998-12-21 10:52:47 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
T=testcert
|
|
|
|
KEY=512
|
|
|
|
CA=../certs/testca.pem
|
2015-04-08 16:28:15 +00:00
|
|
|
OPENSSL_CONF=/dev/null ; export OPENSSL_CONF
|
1998-12-21 10:52:47 +00:00
|
|
|
|
|
|
|
/bin/rm -f $T.1 $T.2 $T.key
|
|
|
|
|
2002-06-13 20:42:35 +00:00
|
|
|
if test "$OSTYPE" = msdosdjgpp; then
|
|
|
|
PATH=../apps\;$PATH;
|
|
|
|
else
|
|
|
|
PATH=../apps:$PATH;
|
|
|
|
fi
|
1998-12-21 10:52:47 +00:00
|
|
|
export PATH
|
|
|
|
|
|
|
|
echo "generating certificate request"
|
|
|
|
|
2000-01-14 18:43:22 +00:00
|
|
|
echo "string to make the random number generator think it has entropy" >> ./.rnd
|
|
|
|
|
2015-04-10 14:06:17 +00:00
|
|
|
if ../util/shlib_wrap.sh ../apps/openssl no-rsa >/dev/null; then
|
2000-03-13 20:31:46 +00:00
|
|
|
req_new='-newkey dsa:../apps/dsa512.pem'
|
|
|
|
else
|
2000-03-13 19:24:39 +00:00
|
|
|
req_new='-new'
|
|
|
|
echo "There should be a 2 sequences of .'s and some +'s."
|
|
|
|
echo "There should not be more that at most 80 per line"
|
|
|
|
fi
|
|
|
|
|
2003-01-10 10:54:59 +00:00
|
|
|
rm -f testkey.pem testreq.pem
|
2003-01-10 10:54:18 +00:00
|
|
|
|
2015-04-10 14:06:17 +00:00
|
|
|
echo Generating request
|
|
|
|
../util/shlib_wrap.sh ../apps/openssl req -config test.cnf $req_new -out testreq.pem || exit 1
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2015-04-10 14:06:17 +00:00
|
|
|
echo Verifying signature on request
|
|
|
|
../util/shlib_wrap.sh ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout || exit 1
|
1998-12-21 10:52:47 +00:00
|
|
|
|
|
|
|
exit 0
|