diff options
Diffstat (limited to 'src/lib/libssl/test/testss')
| -rw-r--r-- | src/lib/libssl/test/testss | 26 |
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 | ||
| 3 | digest='-mdc2' | 3 | digest='-md5' |
| 4 | reqcmd="../apps/ssleay req" | 4 | reqcmd="../apps/openssl req" |
| 5 | x509cmd="../apps/ssleay x509 $digest" | 5 | x509cmd="../apps/openssl x509 $digest" |
| 6 | verifycmd="../apps/ssleay verify" | 6 | verifycmd="../apps/openssl verify" |
| 7 | dummycnf="../apps/openssl.cnf" | ||
| 7 | 8 | ||
| 8 | CAkey="keyCA.ss" | 9 | CAkey="keyCA.ss" |
| 9 | CAcert="certCA.ss" | 10 | CAcert="certCA.ss" |
| @@ -18,7 +19,16 @@ Ucert="certU.ss" | |||
| 18 | 19 | ||
| 19 | echo | 20 | echo |
| 20 | echo "make a certificate request using 'req'" | 21 | echo "make a certificate request using 'req'" |
| 21 | $reqcmd -config $CAconf -out $CAreq -keyout $CAkey -new #>err.ss | 22 | |
| 23 | echo "string to make the random number generator think it has entropy" >> ./.rnd | ||
| 24 | |||
| 25 | if ../apps/openssl no-rsa; then | ||
| 26 | req_new='-newkey dsa:../apps/dsa512.pem' | ||
| 27 | else | ||
| 28 | req_new='-new' | ||
| 29 | fi | ||
| 30 | |||
| 31 | $reqcmd -config $CAconf -out $CAreq -keyout $CAkey $req_new #>err.ss | ||
| 22 | if [ $? != 0 ]; then | 32 | if [ $? != 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 |
| 40 | fi | 50 | fi |
| 41 | 51 | ||
| 42 | $reqcmd -verify -in $CAreq -noout | 52 | $reqcmd -config $dummycnf -verify -in $CAreq -noout |
| 43 | if [ $? != 0 ]; then | 53 | if [ $? != 0 ]; then |
| 44 | echo first generated request is invalid | 54 | echo first generated request is invalid |
| 45 | exit 1 | 55 | exit 1 |
| 46 | fi | 56 | fi |
| 47 | 57 | ||
| 48 | $reqcmd -verify -in $CAreq2 -noout | 58 | $reqcmd -config $dummycnf -verify -in $CAreq2 -noout |
| 49 | if [ $? != 0 ]; then | 59 | if [ $? != 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 | ||
| 60 | echo | 70 | echo |
| 61 | echo "make another certificate request using 'req'" | 71 | echo "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 |
| 63 | if [ $? != 0 ]; then | 73 | if [ $? != 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 |
