summaryrefslogtreecommitdiffstats
path: root/Lib/http
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-03 19:29:33 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-11-03 19:29:33 (GMT)
commit4ffb0752710f0c0720d4f2af0c4b7ce1ebb9d2bd (patch)
tree5082a5a3f18e25c9f0c7ede2717f7170e11b722f /Lib/http
parent8cf7c1cff0f1176387118826fffdf1c517405f3a (diff)
downloadcpython-4ffb0752710f0c0720d4f2af0c4b7ce1ebb9d2bd.zip
cpython-4ffb0752710f0c0720d4f2af0c4b7ce1ebb9d2bd.tar.gz
cpython-4ffb0752710f0c0720d4f2af0c4b7ce1ebb9d2bd.tar.bz2
PEP 476: enable HTTPS certificate verification by default (#22417)
Patch by Alex Gaynor with some modifications by me.
Diffstat (limited to 'Lib/http')
-rw-r--r--Lib/http/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py
index d2013f2..b4cdec4 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -1203,7 +1203,7 @@ else:
self.key_file = key_file
self.cert_file = cert_file
if context is None:
- context = ssl._create_stdlib_context()
+ context = ssl._create_default_https_context()
will_verify = context.verify_mode != ssl.CERT_NONE
if check_hostname is None:
check_hostname = will_verify