add wildcard ssl support

This commit is contained in:
neocogent 2015-07-17 04:03:40 +07:00
parent e444ff3519
commit 59c231808f
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ class TcpInterface(threading.Thread):
return False
if peercert.has_key("subjectAltName"):
for typ, val in peercert["subjectAltName"]:
if typ == "DNS" and val == name:
if typ == "DNS" and (val == name or (val[0] == '*' and name.find(val[1:]) + len(val[1:]) == len(name))):
return True
else:
# Only check the subject DN if there is no subject alternative