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/http | |
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/http')
-rw-r--r-- | Lib/http/client.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index 6e32c7b..5c52ba3 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -1179,9 +1179,7 @@ else: self.key_file = key_file self.cert_file = cert_file if context is None: - # Some reasonable defaults - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) - context.options |= ssl.OP_NO_SSLv2 + context = ssl._create_stdlib_context() will_verify = context.verify_mode != ssl.CERT_NONE if check_hostname is None: check_hostname = will_verify |