From 778a7cc12d65d637f18f170663e0abf60e3ec5d2 Mon Sep 17 00:00:00 2001 From: Dirk Date: Fri, 24 Nov 2017 15:15:50 +0100 Subject: [PATCH] Fix change of warning logic (no protos offered) After changing the logic from $PROTOS_OFFERED contaning each protocol detected to $PROTOS_OFFERED contaning each protocol + colon yes or no there wasn't a change for the sanity check that no protocols are offered. This fixes it. --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 192be81..18b3922 100755 --- a/testssl.sh +++ b/testssl.sh @@ -4595,7 +4595,7 @@ run_protocols() { ;; # no local support esac debugme echo "PROTOS_OFFERED: $PROTOS_OFFERED" - if [[ -z "$PROTOS_OFFERED" ]]; then + if [[ ! "$PROTOS_OFFERED" =~ yes ]]; then outln ignore_no_or_lame "You should not proceed as no protocol was detected. If you still really really want to, say \"YES\"" "YES" [[ $? -ne 0 ]] && exit -2