Merge from main trunk: lets see if this works ;-)
[OpenSSL.git] / test / testgen
blob6a4b6b922128ea8334415bd87b8582701bd4b78a
1 #!/bin/sh
3 T=testcert
4 KEY=512
5 CA=../certs/testca.pem
7 /bin/rm -f $T.1 $T.2 $T.key
9 PATH=../apps:$PATH;
10 export PATH
12 echo "generating certificate request"
14 echo "string to make the random number generator think it has entropy" >> ./.rnd
16 if ../apps/openssl no-rsa; then
17 req_new='-newkey dsa:../apps/dsa512.pem'
18 else
19 req_new='-new'
20 echo "There should be a 2 sequences of .'s and some +'s."
21 echo "There should not be more that at most 80 per line"
24 echo "This could take some time."
26 ../apps/openssl req -config test.cnf $req_new -out testreq.pem
27 if [ $? != 0 ]; then
28 echo problems creating request
29 exit 1
32 ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout
33 if [ $? != 0 ]; then
34 echo signature on req is wrong
35 exit 1
38 exit 0