diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-23 23:06:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-23 23:06:39 (GMT) |
commit | f9284ae8ede5b8977248a4259eee0cd81a100c16 (patch) | |
tree | b3430fd55e6b76ee01dfd6ac4a0baa52de7b7a3a /Lib/smtplib.py | |
parent | f1a3240ba86408a2cdb88a2bfa38a2dce1f4ed9c (diff) | |
parent | 7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b (diff) | |
download | cpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.zip cpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.tar.gz cpython-f9284ae8ede5b8977248a4259eee0cd81a100c16.tar.bz2 |
merge 3.4 (#22921)
Diffstat (limited to 'Lib/smtplib.py')
-rwxr-xr-x | Lib/smtplib.py | 6 |
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") |