From d5c86a8df243ed229cc7785cd1487cf27eec2e87 Mon Sep 17 00:00:00 2001 From: Dirk Date: Fri, 16 Feb 2018 19:11:58 +0100 Subject: [PATCH] Fix #999, for bash 3.1, regex matchg failed --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index b24dfeb..6804591 100755 --- a/testssl.sh +++ b/testssl.sh @@ -1300,7 +1300,7 @@ s_client_options() { local options="$1" # Don't include the -servername option for an SSLv2 or SSLv3 ClientHello. - [[ -n "$SNI" ]] && [[ " $options " =~ \ -ssl[2|3]\ ]] && options="$(sed "s/$SNI//" <<< "$options")" + [[ -n "$SNI" ]] && ( [[ " $options " =~ \ -ssl2\ ]] || [[ " $options " =~ \ -ssl3\ ]] ) && options="$(sed "s/$SNI//" <<< "$options")" # The server_name extension should not be included in the ClientHello unless # the -servername option is provided. However, OpenSSL 1.1.1 will include the