From: Christian Heimes Date: Sat, 24 Mar 2018 14:36:50 +0000 (+0100) Subject: bpo-24334: Remove inaccurate match_hostname call (#6211) X-Git-Tag: v3.8.0a1~2052 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e42ae915095ebca789cc36f3a336a3331fe35945;p=python bpo-24334: Remove inaccurate match_hostname call (#6211) Commit 141c5e8c re-added match_hostname() call. The resurrection of the function call was never intended and was solely a merge mistake. Signed-off-by: Christian Heimes --- diff --git a/Lib/ssl.py b/Lib/ssl.py index 2db8873547..fdd1615744 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -1106,11 +1106,6 @@ class SSLSocket(socket): if timeout == 0.0 and block: self.settimeout(None) self._sslobj.do_handshake() - if self.context.check_hostname: - if not self.server_hostname: - raise ValueError("check_hostname needs server_hostname " - "argument") - match_hostname(self.getpeercert(), self.server_hostname) finally: self.settimeout(timeout)