Import OpenSSL-0.9.8i.
[dragonfly.git] / crypto / openssl-0.9.7d / test / testgen
blob3798543e0473bba3e77a86857b57b9136cd0089c
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 if test "$OSTYPE" = msdosdjgpp; then
10 PATH=../apps\;$PATH;
11 else
12 PATH=../apps:$PATH;
14 export PATH
16 echo "generating certificate request"
18 echo "string to make the random number generator think it has entropy" >> ./.rnd
20 if ../apps/openssl no-rsa; then
21 req_new='-newkey dsa:../apps/dsa512.pem'
22 else
23 req_new='-new'
24 echo "There should be a 2 sequences of .'s and some +'s."
25 echo "There should not be more that at most 80 per line"
28 echo "This could take some time."
30 rm -f testkey.pem testreq.pem
32 ../apps/openssl req -config test.cnf $req_new -out testreq.pem
33 if [ $? != 0 ]; then
34 echo problems creating request
35 exit 1
38 ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout
39 if [ $? != 0 ]; then
40 echo signature on req is wrong
41 exit 1
44 exit 0