Browse Source

add wildcard ssl support

master
neocogent 11 years ago
parent
commit
59c231808f
  1. 2
      lib/interface.py

2
lib/interface.py

@ -129,7 +129,7 @@ class TcpInterface(threading.Thread):
return False return False
if peercert.has_key("subjectAltName"): if peercert.has_key("subjectAltName"):
for typ, val in peercert["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 return True
else: else:
# Only check the subject DN if there is no subject alternative # Only check the subject DN if there is no subject alternative

Loading…
Cancel
Save