summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-23 23:06:39 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-11-23 23:06:39 (GMT)
commitf9284ae8ede5b8977248a4259eee0cd81a100c16 (patch)
treeb3430fd55e6b76ee01dfd6ac4a0baa52de7b7a3a /Lib/smtplib.py
parentf1a3240ba86408a2cdb88a2bfa38a2dce1f4ed9c (diff)
parent7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b (diff)
downloadcpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.zip
cpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.tar.gz
cpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.tar.bz2
merge 3.4 (#22921)
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-xLib/smtplib.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 6676af8..327a454 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -709,9 +709,8 @@ class SMTP:
if context is None:
context = ssl._create_stdlib_context(certfile=certfile,
keyfile=keyfile)
- server_hostname = self._host if ssl.HAS_SNI else None
self.sock = context.wrap_socket(self.sock,
- server_hostname=server_hostname)
+ server_hostname=self._host)
self.file = None
# RFC 3207:
# The client MUST discard any knowledge obtained from
@@ -940,9 +939,8 @@ if _have_ssl:
print('connect:', (host, port), file=stderr)
new_socket = socket.create_connection((host, port), timeout,
self.source_address)
- server_hostname = self._host if ssl.HAS_SNI else None
new_socket = self.context.wrap_socket(new_socket,
- server_hostname=server_hostname)
+ server_hostname=self._host)
return new_socket
__all__.append("SMTP_SSL")