summaryrefslogtreecommitdiff
path: root/common/src/leap/soledad/common/l2db/remote/ssl_match_hostname.py
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/leap/soledad/common/l2db/remote/ssl_match_hostname.py')
-rw-r--r--common/src/leap/soledad/common/l2db/remote/ssl_match_hostname.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/src/leap/soledad/common/l2db/remote/ssl_match_hostname.py b/common/src/leap/soledad/common/l2db/remote/ssl_match_hostname.py
index fbabc177..ce82f1b2 100644
--- a/common/src/leap/soledad/common/l2db/remote/ssl_match_hostname.py
+++ b/common/src/leap/soledad/common/l2db/remote/ssl_match_hostname.py
@@ -52,13 +52,14 @@ def match_hostname(cert, hostname):
return
dnsnames.append(value)
if len(dnsnames) > 1:
- raise CertificateError("hostname %r "
- "doesn't match either of %s"
+ raise CertificateError(
+ "hostname %r doesn't match either of %s"
% (hostname, ', '.join(map(repr, dnsnames))))
elif len(dnsnames) == 1:
- raise CertificateError("hostname %r "
- "doesn't match %r"
+ raise CertificateError(
+ "hostname %r doesn't match %r"
% (hostname, dnsnames[0]))
else:
- raise CertificateError("no appropriate commonName or "
+ raise CertificateError(
+ "no appropriate commonName or "
"subjectAltName fields were found")