DNS name check got reversed; breaks wildcards

This commit is contained in:
Joseph Schorr 2017-01-29 11:51:37 -05:00
parent 2dfae9e892
commit d63cca025a
2 changed files with 14 additions and 1 deletions

View file

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