summaryrefslogtreecommitdiff
path: root/src/lib/libssl/test/testss
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/test/testss')
-rw-r--r--src/lib/libssl/test/testss26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/lib/libssl/test/testss b/src/lib/libssl/test/testss
index a5aecf4694..8d3557f356 100644
--- a/src/lib/libssl/test/testss
+++ b/src/lib/libssl/test/testss
@@ -1,9 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3digest='-mdc2' 3digest='-md5'
4reqcmd="../apps/ssleay req" 4reqcmd="../apps/openssl req"
5x509cmd="../apps/ssleay x509 $digest" 5x509cmd="../apps/openssl x509 $digest"
6verifycmd="../apps/ssleay verify" 6verifycmd="../apps/openssl verify"
7dummycnf="../apps/openssl.cnf"
7 8
8CAkey="keyCA.ss" 9CAkey="keyCA.ss"
9CAcert="certCA.ss" 10CAcert="certCA.ss"
@@ -18,7 +19,16 @@ Ucert="certU.ss"
18 19
19echo 20echo
20echo "make a certificate request using 'req'" 21echo "make a certificate request using 'req'"
21$reqcmd -config $CAconf -out $CAreq -keyout $CAkey -new #>err.ss 22
23echo "string to make the random number generator think it has entropy" >> ./.rnd
24
25if ../apps/openssl no-rsa; then
26 req_new='-newkey dsa:../apps/dsa512.pem'
27else
28 req_new='-new'
29fi
30
31$reqcmd -config $CAconf -out $CAreq -keyout $CAkey $req_new #>err.ss
22if [ $? != 0 ]; then 32if [ $? != 0 ]; then
23 echo "error using 'req' to generate a certificate request" 33 echo "error using 'req' to generate a certificate request"
24 exit 1 34 exit 1
@@ -39,13 +49,13 @@ if [ $? != 0 ]; then
39 exit 1 49 exit 1
40fi 50fi
41 51
42$reqcmd -verify -in $CAreq -noout 52$reqcmd -config $dummycnf -verify -in $CAreq -noout
43if [ $? != 0 ]; then 53if [ $? != 0 ]; then
44 echo first generated request is invalid 54 echo first generated request is invalid
45 exit 1 55 exit 1
46fi 56fi
47 57
48$reqcmd -verify -in $CAreq2 -noout 58$reqcmd -config $dummycnf -verify -in $CAreq2 -noout
49if [ $? != 0 ]; then 59if [ $? != 0 ]; then
50 echo second generated request is invalid 60 echo second generated request is invalid
51 exit 1 61 exit 1
@@ -59,7 +69,7 @@ fi
59 69
60echo 70echo
61echo "make another certificate request using 'req'" 71echo "make another certificate request using 'req'"
62$reqcmd -config $Uconf -out $Ureq -keyout $Ukey -new >err.ss 72$reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss
63if [ $? != 0 ]; then 73if [ $? != 0 ]; then
64 echo "error using 'req' to generate a certificate request" 74 echo "error using 'req' to generate a certificate request"
65 exit 1 75 exit 1