diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-23 17:04:34 -0600 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-23 17:04:34 -0600 |
commit | 835b7da7d3f3571af420205f9845f287b41e8d28 (patch) | |
tree | 0026c53f384344b510296bb8236f9bf7cee256e1 /Lib/http/client.py | |
parent | a14e46b77e221484c467aed8034f8204cb5c8289 (diff) | |
download | cpython-835b7da7d3f3571af420205f9845f287b41e8d28.tar.gz |
don't require OpenSSL SNI to pass hostname to ssl functions (#22921)
Patch by Donald Stufft.
Diffstat (limited to 'Lib/http/client.py')
-rw-r--r-- | Lib/http/client.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index b4cdec4508..cb1a53579c 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -1224,10 +1224,9 @@ else: server_hostname = self._tunnel_host else: server_hostname = self.host - sni_hostname = server_hostname if ssl.HAS_SNI else None self.sock = self._context.wrap_socket(self.sock, - server_hostname=sni_hostname) + server_hostname=server_hostname) if not self._context.check_hostname and self._check_hostname: try: ssl.match_hostname(self.sock.getpeercert(), server_hostname) |