relax host+domain names to contain underscore, see #1015

This commit is contained in:
Dirk 2018-03-18 23:38:23 +01:00
parent c91a771465
commit a178f3e183
1 changed files with 1 additions and 1 deletions

View File

@ -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