DNS name check got reversed; breaks wildcards
This commit is contained in:
parent
2dfae9e892
commit
d63cca025a
2 changed files with 14 additions and 1 deletions
|
@ -45,7 +45,7 @@ class SSLCertificate(object):
|
|||
def matches_name(self, check_name):
|
||||
""" Returns true if this SSL certificate matches the given DNS hostname. """
|
||||
for dns_name in self.names:
|
||||
if fnmatch(dns_name, check_name):
|
||||
if fnmatch(check_name, dns_name):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
Reference in a new issue