summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-03 19:36:48 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-11-03 19:36:48 (GMT)
commit1cca273669598978f6dfc1d1aad92e02a84bbe04 (patch)
tree1f691e61f1dcc13f14fee02fe0031dd865e74869 /Lib/ssl.py
parent2cb0e73a89589ce56ba17da39a06f8017cfc92e4 (diff)
parent4ffb0752710f0c0720d4f2af0c4b7ce1ebb9d2bd (diff)
downloadcpython-1cca273669598978f6dfc1d1aad92e02a84bbe04.zip
cpython-1cca273669598978f6dfc1d1aad92e02a84bbe04.tar.gz
cpython-1cca273669598978f6dfc1d1aad92e02a84bbe04.tar.bz2
merge 3.4 (#22417)
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index d2ad402..726bc7b 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -436,8 +436,7 @@ def create_default_context(purpose=Purpose.SERVER_AUTH, *, cafile=None,
context.load_default_certs(purpose)
return context
-
-def _create_stdlib_context(protocol=PROTOCOL_SSLv23, *, cert_reqs=None,
+def _create_unverified_context(protocol=PROTOCOL_SSLv23, *, cert_reqs=None,
check_hostname=False, purpose=Purpose.SERVER_AUTH,
certfile=None, keyfile=None,
cafile=None, capath=None, cadata=None):
@@ -478,6 +477,13 @@ def _create_stdlib_context(protocol=PROTOCOL_SSLv23, *, cert_reqs=None,
return context
+# Used by http.client if no context is explicitly passed.
+_create_default_https_context = create_default_context
+
+
+# Backwards compatibility alias, even though it's not a public name.
+_create_stdlib_context = _create_unverified_context
+
class SSLObject:
"""This class implements an interface on top of a low-level SSL object as