From 59c231808f9896d1725d653f3a40f7086c76683f Mon Sep 17 00:00:00 2001 From: neocogent Date: Fri, 17 Jul 2015 04:03:40 +0700 Subject: [PATCH] add wildcard ssl support --- lib/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/interface.py b/lib/interface.py index 0c7a3c299..8ca224b4b 100644 --- a/lib/interface.py +++ b/lib/interface.py @@ -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