[Python-checkins] [3.7] bpo-24334: Remove inaccurate match_hostname call (GH-6211) (#6212)
Christian Heimes
webhook-mailer at python.org
Sat Mar 24 10:59:19 EDT 2018
https://github.com/python/cpython/commit/1a0bb626f4cfd95f7ec406ea7d3f9433def559fc
commit: 1a0bb626f4cfd95f7ec406ea7d3f9433def559fc
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Christian Heimes <christian at python.org>
date: 2018年03月24日T15:59:16+01:00
summary:
[3.7] bpo-24334: Remove inaccurate match_hostname call (GH-6211) (#6212)
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 at python.org>
(cherry picked from commit e42ae915095ebca789cc36f3a336a3331fe35945)
Co-authored-by: Christian Heimes <christian at python.org>
files:
M Lib/ssl.py
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 2db887354714..fdd161574434 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -1106,11 +1106,6 @@ def do_handshake(self, block=False):
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)
More information about the Python-checkins
mailing list