diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-23 23:04:34 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-23 23:04:34 (GMT) |
commit | 7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b (patch) | |
tree | 4cd25f9fde37754132337eebdd1b1e958bf979f4 /Lib/nntplib.py | |
parent | 378e15d7abedb4a1990230d5e3c74d2390be96c4 (diff) | |
download | cpython-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/nntplib.py')
-rw-r--r-- | Lib/nntplib.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py index d33faf8..bcf7d1b 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 |