]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/testgen
Add support for DJGPP.
[thirdparty/openssl.git] / test / testgen
CommitLineData
d02b48c6
RE
1#!/bin/sh
2
3T=testcert
4KEY=512
5CA=../certs/testca.pem
6
7/bin/rm -f $T.1 $T.2 $T.key
8
451dc18f
RL
9if test "$OSTYPE" = msdosdjgpp; then
10 PATH=../apps\;$PATH;
11else
12 PATH=../apps:$PATH;
13fi
d02b48c6
RE
14export PATH
15
16echo "generating certificate request"
17
105c0be0
BM
18echo "string to make the random number generator think it has entropy" >> ./.rnd
19
46c4647e
BM
20if ../apps/openssl no-rsa; then
21 req_new='-newkey dsa:../apps/dsa512.pem'
22else
65b002f3
BM
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"
65b002f3
BM
26fi
27
28echo "This could take some time."
29
30../apps/openssl req -config test.cnf $req_new -out testreq.pem
d02b48c6
RE
31if [ $? != 0 ]; then
32echo problems creating request
33exit 1
34fi
35
56f74f2e 36../apps/openssl req -config test.cnf -verify -in testreq.pem -noout
d02b48c6
RE
37if [ $? != 0 ]; then
38echo signature on req is wrong
39exit 1
40fi
41
42exit 0