summaryrefslogtreecommitdiff
path: root/Lib/poplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/poplib.py')
-rw-r--r--Lib/poplib.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/poplib.py b/Lib/poplib.py
index 2b0e3d5415..8ad9cb77db 100644
--- a/Lib/poplib.py
+++ b/Lib/poplib.py
@@ -387,9 +387,8 @@ class POP3:
if context is None:
context = ssl._create_stdlib_context()
resp = self._shortcmd('STLS')
- 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 = self.sock.makefile('rb')
self._tls_established = True
return resp
@@ -430,9 +429,8 @@ if HAVE_SSL:
def _create_socket(self, timeout):
sock = POP3._create_socket(self, timeout)
- server_hostname = self.host if ssl.HAS_SNI else None
sock = self.context.wrap_socket(sock,
- server_hostname=server_hostname)
+ server_hostname=self.host)
return sock
def stls(self, keyfile=None, certfile=None, context=None):