From 2b7a77979c69a5b3447654eec2c205fe66a95c3d Mon Sep 17 00:00:00 2001 From: David Cooper Date: Thu, 11 Aug 2016 14:40:20 -0400 Subject: [PATCH] Fix "--devel" with SSLv2 If testssl.sh is called with `--devel 22` and the response from `sslv2_sockets()` is not 0, then `tls_sockets()` will be called, and the result of the `tls_sockets()` command will be output rather than the result of the `sslv2_sockets()` command. --- testssl.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testssl.sh b/testssl.sh index 1d91590..4bf34dd 100755 --- a/testssl.sh +++ b/testssl.sh @@ -8527,9 +8527,8 @@ lets_roll() { determine_rdns determine_service "$1" # any starttls service goes here - $do_tls_sockets && { [[ $TLS_LOW_BYTE -eq 22 ]] && \ - sslv2_sockets || \ - tls_sockets "$TLS_LOW_BYTE" "$HEX_CIPHER"; echo "$?" ; exit 0; } + $do_tls_sockets && [[ $TLS_LOW_BYTE -eq 22 ]] && { sslv2_sockets; echo "$?" ; exit 0; } + $do_tls_sockets && [[ $TLS_LOW_BYTE -ne 22 ]] && { tls_sockets "$TLS_LOW_BYTE" "$HEX_CIPHER"; echo "$?" ; exit 0; } $do_test_just_one && test_just_one ${single_cipher} # all top level functions now following have the prefix "run_"