diff options
author | Christian Heimes <christian@cheimes.de> | 2013-11-23 21:43:47 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-11-23 21:43:47 (GMT) |
commit | 67986f94311ffb46fe5b3efce74d749029041b73 (patch) | |
tree | 70aeabba17581022cb3dfcd1c9a59a284a0c1bca /Lib/asyncio/selector_events.py | |
parent | 32eddc1bbc47479a3639b9191ffc82a52903c5f4 (diff) | |
download | cpython-67986f94311ffb46fe5b3efce74d749029041b73.zip cpython-67986f94311ffb46fe5b3efce74d749029041b73.tar.gz cpython-67986f94311ffb46fe5b3efce74d749029041b73.tar.bz2 |
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/asyncio/selector_events.py')
-rw-r--r-- | Lib/asyncio/selector_events.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py index 3efa4d2..14c9700 100644 --- a/Lib/asyncio/selector_events.py +++ b/Lib/asyncio/selector_events.py @@ -571,10 +571,8 @@ class _SelectorSslTransport(_SelectorTransport): # context; in that case the sslcontext passed is None. # The default is the same as used by urllib with # cadefault=True. - sslcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23) - sslcontext.options |= ssl.OP_NO_SSLv2 - sslcontext.set_default_verify_paths() - sslcontext.verify_mode = ssl.CERT_REQUIRED + sslcontext = ssl._create_stdlib_context( + cert_reqs=ssl.CERT_REQUIRED) wrap_kwargs = { 'server_side': server_side, |