summaryrefslogtreecommitdiffstats
path: root/Lib/http/client.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-23 23:04:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-11-23 23:04:34 (GMT)
commit7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b (patch)
tree4cd25f9fde37754132337eebdd1b1e958bf979f4 /Lib/http/client.py
parent378e15d7abedb4a1990230d5e3c74d2390be96c4 (diff)
downloadcpython-7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b.zip
cpython-7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b.tar.gz
cpython-7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b.tar.bz2
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 b4cdec4..cb1a535 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)