]> granicus.if.org Git - python/commitdiff
bpo-24334: Remove inaccurate match_hostname call (#6211)
authorChristian Heimes <christian@python.org>
Sat, 24 Mar 2018 14:36:50 +0000 (15:36 +0100)
committerGitHub <noreply@github.com>
Sat, 24 Mar 2018 14:36:50 +0000 (15:36 +0100)
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 <christian@python.org>
Lib/ssl.py

index 2db8873547147a817165b41eb0dfdc9280ddf9b5..fdd1615744347ec2f57dde0107c0653ad702249f 100644 (file)
@@ -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)