Remove the special list-xxxx commands
[openssl.git] / test / testgen
1 #!/bin/sh
2
3 T=testcert
4 KEY=512
5 CA=../certs/testca.pem
6 OPENSSL_CONF=/dev/null ; export OPENSSL_CONF
7
8 /bin/rm -f $T.1 $T.2 $T.key
9
10 if test "$OSTYPE" = msdosdjgpp; then
11     PATH=../apps\;$PATH;
12 else
13     PATH=../apps:$PATH;
14 fi
15 export PATH
16
17 echo "generating certificate request"
18
19 echo "string to make the random number generator think it has entropy" >> ./.rnd
20
21 if ../util/shlib_wrap.sh ../apps/openssl no-rsa >/dev/null; then
22   req_new='-newkey dsa:../apps/dsa512.pem'
23 else
24   req_new='-new'
25   echo "There should be a 2 sequences of .'s and some +'s."
26   echo "There should not be more that at most 80 per line"
27 fi
28
29 rm -f testkey.pem testreq.pem
30
31 echo Generating request
32 ../util/shlib_wrap.sh ../apps/openssl req -config test.cnf $req_new -out testreq.pem || exit 1
33
34 echo Verifying signature on request
35 ../util/shlib_wrap.sh ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout || exit 1
36
37 exit 0