summaryrefslogtreecommitdiff
path: root/src/lib/libssl/test/testgen
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/test/testgen')
-rw-r--r--src/lib/libssl/test/testgen38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/lib/libssl/test/testgen b/src/lib/libssl/test/testgen
new file mode 100644
index 0000000000..6a4b6b9221
--- /dev/null
+++ b/src/lib/libssl/test/testgen
@@ -0,0 +1,38 @@
1#!/bin/sh
2
3T=testcert
4KEY=512
5CA=../certs/testca.pem
6
7/bin/rm -f $T.1 $T.2 $T.key
8
9PATH=../apps:$PATH;
10export PATH
11
12echo "generating certificate request"
13
14echo "string to make the random number generator think it has entropy" >> ./.rnd
15
16if ../apps/openssl no-rsa; then
17 req_new='-newkey dsa:../apps/dsa512.pem'
18else
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"
22fi
23
24echo "This could take some time."
25
26../apps/openssl req -config test.cnf $req_new -out testreq.pem
27if [ $? != 0 ]; then
28echo problems creating request
29exit 1
30fi
31
32../apps/openssl req -config test.cnf -verify -in testreq.pem -noout
33if [ $? != 0 ]; then
34echo signature on req is wrong
35exit 1
36fi
37
38exit 0