summaryrefslogtreecommitdiff
path: root/Lib/http/client.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-23 17:04:34 -0600
committerBenjamin Peterson <benjamin@python.org>2014-11-23 17:04:34 -0600
commit835b7da7d3f3571af420205f9845f287b41e8d28 (patch)
tree0026c53f384344b510296bb8236f9bf7cee256e1 /Lib/http/client.py
parenta14e46b77e221484c467aed8034f8204cb5c8289 (diff)
downloadcpython-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.py3
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)