summaryrefslogtreecommitdiff
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-11-23 22:43:47 +0100
committerChristian Heimes <christian@cheimes.de>2013-11-23 22:43:47 +0100
commit67986f94311ffb46fe5b3efce74d749029041b73 (patch)
tree70aeabba17581022cb3dfcd1c9a59a284a0c1bca /Lib/nntplib.py
parent32eddc1bbc47479a3639b9191ffc82a52903c5f4 (diff)
downloadcpython-git-67986f94311ffb46fe5b3efce74d749029041b73.tar.gz
Issue #19735: Implement private function ssl._create_stdlib_context() to
create SSLContext objects in Python's stdlib module. It provides a single configuration point and makes use of SSLContext.load_default_certs().
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r--Lib/nntplib.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index 9766be3bc5..046f48343d 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -288,9 +288,7 @@ if _have_ssl:
"""
# Generate a default SSL context if none was passed.
if context is None:
- context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
- # SSLv2 considered harmful.
- context.options |= ssl.OP_NO_SSLv2
+ context = ssl._create_stdlib_context()
return context.wrap_socket(sock)