From a178f3e1838f0698e193337e10f0c32eb8c5f34a Mon Sep 17 00:00:00 2001 From: Dirk Date: Sun, 18 Mar 2018 23:38:23 +0100 Subject: [PATCH] relax host+domain names to contain underscore, see #1015 --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 1f19dcc..7d3ff0d 100755 --- a/testssl.sh +++ b/testssl.sh @@ -6369,7 +6369,7 @@ compare_server_name_to_cert() { # If the CN contains any characters that are not valid for a DNS name, # then assume it does not contain a DNS name. - [[ -n $(sed 's/^[\.a-zA-Z0-9*\-]*//' <<< "$cn") ]] && return $subret + [[ -n $(sed 's/^[_\.a-zA-Z0-9*\-]*//' <<< "$cn") ]] && return $subret # Check whether the CN in the certificate matches the servername [[ $(toupper "$cn") == "$servername" ]] && subret+=4 && return $subret