From decade9986efd0e06f9e9cca6bd1329b2cc7b7c9 Mon Sep 17 00:00:00 2001 From: Dirk Date: Wed, 7 Jan 2015 23:16:45 +0100 Subject: [PATCH 1/2] safer batch processing if port isn't available --- testssl.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/testssl.sh b/testssl.sh index 26c84d6..386da39 100755 --- a/testssl.sh +++ b/testssl.sh @@ -1909,10 +1909,8 @@ EOF ignore_no_or_lame() { - if [ "$WARNINGS" = "off" -o "$WARNINGS" = "false" ]; then - return 0 - fi - #outln + [ "$WARNINGS" = "off" -o "$WARNINGS" = "false" ] && return 0 + [ "$WARNINGS" = "batch" ] && return 1 magenta "$1 " read a case $a in @@ -1969,8 +1967,8 @@ parse_hn_port() { $OPENSSL s_client -connect "$NODE:$PORT" $SNI /dev/null 2>&1 if [ $? -ne 0 ]; then boldln "$NODE:$PORT doesn't seem a TLS/SSL enabled server or it requires a certificate"; - ignore_no_or_lame "Do you want to exit (note that otherwise results might look ok but they are nonsense) ? " - [ $? -eq 0 ] && exit 3 + ignore_no_or_lame "Proceed (note that the results might look ok but they are nonsense) ? " + [ $? -ne 0 ] && exit 3 fi fi @@ -2255,6 +2253,6 @@ case "$1" in exit $ret ;; esac -# $Id: testssl.sh,v 1.162 2014/12/23 08:57:52 dirkw Exp $ +# $Id: testssl.sh,v 1.163 2015/01/06 15:25:18 dirkw Exp $ # vim:ts=5:sw=5 From 5044412f3956846c2c55660a11d1e9363d66718f Mon Sep 17 00:00:00 2001 From: Dirk Date: Wed, 7 Jan 2015 23:29:05 +0100 Subject: [PATCH 2/2] - moved utils to separate dir --- .../bash-heartbleed.changelog.txt | 0 bash-heartbleed.sh => utils/bash-heartbleed.sh | 0 ccs-injection.sh => utils/ccs-injection.sh | 0 checkcert.sh => utils/checkcert.sh | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename bash-heartbleed.changelog.txt => utils/bash-heartbleed.changelog.txt (100%) rename bash-heartbleed.sh => utils/bash-heartbleed.sh (100%) rename ccs-injection.sh => utils/ccs-injection.sh (100%) rename checkcert.sh => utils/checkcert.sh (100%) diff --git a/bash-heartbleed.changelog.txt b/utils/bash-heartbleed.changelog.txt similarity index 100% rename from bash-heartbleed.changelog.txt rename to utils/bash-heartbleed.changelog.txt diff --git a/bash-heartbleed.sh b/utils/bash-heartbleed.sh similarity index 100% rename from bash-heartbleed.sh rename to utils/bash-heartbleed.sh diff --git a/ccs-injection.sh b/utils/ccs-injection.sh similarity index 100% rename from ccs-injection.sh rename to utils/ccs-injection.sh diff --git a/checkcert.sh b/utils/checkcert.sh similarity index 100% rename from checkcert.sh rename to utils/checkcert.sh