From 7bf1319c93ede869eaacdeda2f8719abce4da33c Mon Sep 17 00:00:00 2001 From: Dirk Date: Thu, 15 Oct 2015 15:14:37 +0200 Subject: [PATCH] - FIX #218 for exim and friends --- testssl.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/testssl.sh b/testssl.sh index 94814ef..8733c55 100755 --- a/testssl.sh +++ b/testssl.sh @@ -2438,12 +2438,24 @@ starttls_line() { if egrep -q "$2" $TMPFILE; then debugme echo "---> reply matched \"$2\"" else - debugme echo "---> reply didn't match \"$2\", see $TMPFILE" - pr_magenta "STARTTLS handshake problem. " - outln "Either switch to native openssl (--ssl-native), " - outln " give the server more time to reply (STARTTLS_SLEEP= ./testssh.sh ..) -- " - outln " or debug what happened (add --debug=2)" - exit -3 + # slow down for exim and friends who need a proper handshake:, see + # https://github.com/drwetter/testssl.sh/issues/218 + FAST_STARTTLS=false + debugme echo -e "\n=== sending with automated FAST_STARTTLS=false \"$1\" ..." + echo -e "$1" >&5 + cat <&5 >$TMPFILE & + debugme echo "... received result: " + debugme cat $TMPFILE + if [[ -n "$2" ]]; then + debugme echo "---> reply with automated FAST_STARTTLS=false matched \"$2\"" + else + debugme echo "---> reply didn't match \"$2\", see $TMPFILE" + pr_magenta "STARTTLS handshake problem. " + outln "Either switch to native openssl (--ssl-native), " + outln " give the server more time to reply (STARTTLS_SLEEP= ./testssh.sh ..) -- " + outln " or debug what happened (add --debug=2)" + return 3 + fi fi fi @@ -5239,4 +5251,4 @@ fi exit $? -# $Id: testssl.sh,v 1.410 2015/10/15 12:15:06 dirkw Exp $ +# $Id: testssl.sh,v 1.411 2015/10/15 13:14:36 dirkw Exp $