X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Ftestss;h=fc27c83fa762db069ef9448cba066234cb8443e3;hp=a5aecf4694df891505bbebf0e6a00f9000e167b4;hb=65b002f39934a755b6db855c9f9ba722d6cef863;hpb=7dfb0b774e6592dcbfe47015168a0ac8b44e2a17 diff --git a/test/testss b/test/testss index a5aecf4694..fc27c83fa7 100644 --- a/test/testss +++ b/test/testss @@ -1,9 +1,10 @@ #!/bin/sh digest='-mdc2' -reqcmd="../apps/ssleay req" -x509cmd="../apps/ssleay x509 $digest" -verifycmd="../apps/ssleay verify" +reqcmd="../apps/openssl req" +x509cmd="../apps/openssl x509 $digest" +verifycmd="../apps/openssl verify" +dummycnf="../apps/openssl.cnf" CAkey="keyCA.ss" CAcert="certCA.ss" @@ -18,7 +19,14 @@ Ucert="certU.ss" echo echo "make a certificate request using 'req'" -$reqcmd -config $CAconf -out $CAreq -keyout $CAkey -new #>err.ss + +if ../apps/openssl list-standard-commands | grep '^rsa$' >/dev/null; then + req_new='-new' +else + req_new='-newkey dsa:../apps/dsa512.pem' +fi + +$reqcmd -config $CAconf -out $CAreq -keyout $CAkey $req_new #>err.ss if [ $? != 0 ]; then echo "error using 'req' to generate a certificate request" exit 1 @@ -39,13 +47,13 @@ if [ $? != 0 ]; then exit 1 fi -$reqcmd -verify -in $CAreq -noout +$reqcmd -config $dummycnf -verify -in $CAreq -noout if [ $? != 0 ]; then echo first generated request is invalid exit 1 fi -$reqcmd -verify -in $CAreq2 -noout +$reqcmd -config $dummycnf -verify -in $CAreq2 -noout if [ $? != 0 ]; then echo second generated request is invalid exit 1 @@ -59,7 +67,7 @@ fi echo echo "make another certificate request using 'req'" -$reqcmd -config $Uconf -out $Ureq -keyout $Ukey -new >err.ss +$reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss if [ $? != 0 ]; then echo "error using 'req' to generate a certificate request" exit 1