From c5f4ab63c45e7eb0168d242f24e861bbbf294f6b Mon Sep 17 00:00:00 2001 From: bcook <> Date: Wed, 3 Dec 2014 22:33:35 +0000 Subject: Allow overriding the path to the testssl and openssl binaries. This is needed by the portable tree to point directly to the newly-built binaries when running unit tests. discussed with jsing@ and others --- src/regress/lib/libssl/ssl/testssl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/regress/lib/libssl/ssl/testssl b/src/regress/lib/libssl/ssl/testssl index ca974a68c9..ff63ce1e44 100644 --- a/src/regress/lib/libssl/ssl/testssl +++ b/src/regress/lib/libssl/ssl/testssl @@ -3,11 +3,11 @@ key="$1" cert="$2" CA="-CAfile $3" -extra="$4" +ssltest="${4-./ssltest} -key $key -cert $cert -c_key $key -c_cert $cert" +openssl=${5-openssl} +extra="$6" -ssltest="./ssltest -key $key -cert $cert -c_key $key -c_cert $cert" - -if openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then +if $openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then dsa_cert=YES else dsa_cert=NO @@ -105,7 +105,7 @@ $ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1 echo "Testing ciphersuites" for protocol in TLSv1.2 SSLv3; do echo "Testing ciphersuites for $protocol" - for cipher in `openssl ciphers "RSA+$protocol" | tr ':' ' '`; do + for cipher in `$openssl ciphers "RSA+$protocol" | tr ':' ' '`; do echo "Testing $cipher" prot="" if [ $protocol = "SSLv3" ] ; then @@ -121,20 +121,20 @@ done ############################################################################# -if openssl no-dh; then +if $openssl no-dh; then echo skipping anonymous DH tests else echo test tls1 with 1024bit anonymous DH, multiple handshakes $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1 fi -#if openssl no-rsa; then +#if $openssl no-rsa; then # echo skipping RSA tests #else # echo 'test tls1 with 1024bit RSA, no (EC)DHE, multiple handshakes' # ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -no_ecdhe -num 10 -f -time $extra || exit 1 # -# if openssl no-dh; then +# if $openssl no-dh; then # echo skipping RSA+DHE tests # else # echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes @@ -161,7 +161,7 @@ $ssltest -dtls1 -server_auth -client_auth $CA $extra || exit 1 echo "Testing DTLS ciphersuites" for protocol in SSLv3; do echo "Testing ciphersuites for $protocol" - for cipher in `openssl ciphers "RSA+$protocol" | tr ':' '\n' | + for cipher in `$openssl ciphers "RSA+$protocol" | tr ':' '\n' | grep -v RC4`; do echo "Testing $cipher" $ssltest -cipher $cipher -dtls1 -- cgit v1.2.3-55-g6feb