From 7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 23 Nov 2014 17:04:34 -0600 Subject: don't require OpenSSL SNI to pass hostname to ssl functions (#22921) Patch by Donald Stufft. --- Lib/nntplib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Lib/nntplib.py') diff --git a/Lib/nntplib.py b/Lib/nntplib.py index d33faf85b9..bcf7d1bd33 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -289,8 +289,7 @@ if _have_ssl: # Generate a default SSL context if none was passed. if context is None: context = ssl._create_stdlib_context() - server_hostname = hostname if ssl.HAS_SNI else None - return context.wrap_socket(sock, server_hostname=server_hostname) + return context.wrap_socket(sock, server_hostname=hostname) # The classes themselves -- cgit v1.2.1