From 55bbeef36c9356fb20b546ec807a2f74930d0aca Mon Sep 17 00:00:00 2001 From: typingArtist Date: Sun, 30 Apr 2017 19:57:40 +0200 Subject: [PATCH] correctly capture return code in starttls_full_read --- testssl.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index 9a4b4ee..a8ee005 100755 --- a/testssl.sh +++ b/testssl.sh @@ -6843,7 +6843,7 @@ starttls_full_read(){ local oldIFS="$IFS" IFS='' - while read -r -t $STARTTLS_SLEEP one_line; do + while read -r -t $STARTTLS_SLEEP one_line; ret=$?; (exit $ret); do debugme echo "S: ${one_line}" if [[ $# -ge 3 ]]; then if [[ ${one_line} =~ $3 ]]; then @@ -6863,7 +6863,6 @@ starttls_full_read(){ return 2 fi done <&5 - ret=$? debugme echo "=== full read error/timeout ===" IFS="${oldIFS}" return $ret