From 67986f94311ffb46fe5b3efce74d749029041b73 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 23 Nov 2013 22:43:47 +0100 Subject: 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(). --- Lib/nntplib.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Lib/nntplib.py') 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) -- cgit v1.2.1