diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-12-07 18:47:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-12-07 18:47:39 (GMT) |
commit | 074b95da48ffb08605cf1faa80a98bea7cc8e99e (patch) | |
tree | 43c4bfb88c7687abeee149162e4aca479bc61953 /Lib/urllib | |
parent | b46247bee518487abcc9e17925d28d682b8e08ac (diff) | |
parent | b666697fa8e815ca09ace0cd6d4cd2bd76080f5e (diff) | |
download | cpython-074b95da48ffb08605cf1faa80a98bea7cc8e99e.zip cpython-074b95da48ffb08605cf1faa80a98bea7cc8e99e.tar.gz cpython-074b95da48ffb08605cf1faa80a98bea7cc8e99e.tar.bz2 |
merge 3.4
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 36ae1ef..3ba7c01 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -146,10 +146,10 @@ def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, ) if not _have_ssl: raise ValueError('SSL support not available') - context = ssl._create_stdlib_context(cert_reqs=ssl.CERT_REQUIRED, + context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH, cafile=cafile, capath=capath) - https_handler = HTTPSHandler(context=context, check_hostname=True) + https_handler = HTTPSHandler(context=context) opener = build_opener(https_handler) elif context: https_handler = HTTPSHandler(context=context) |