diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-03 19:29:33 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-03 19:29:33 (GMT) |
commit | 4ffb0752710f0c0720d4f2af0c4b7ce1ebb9d2bd (patch) | |
tree | 5082a5a3f18e25c9f0c7ede2717f7170e11b722f /Doc/library/http.client.rst | |
parent | 8cf7c1cff0f1176387118826fffdf1c517405f3a (diff) | |
download | cpython-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 'Doc/library/http.client.rst')
-rw-r--r-- | Doc/library/http.client.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst index 9f6bcd1..35b9355 100644 --- a/Doc/library/http.client.rst +++ b/Doc/library/http.client.rst @@ -71,12 +71,6 @@ The module provides the following classes: :func:`ssl.create_default_context` select the system's trusted CA certificates for you. - The recommended way to connect to HTTPS hosts on the Internet is as - follows:: - - context = ssl.create_default_context() - h = client.HTTPSConnection('www.python.org', 443, context=context) - Please read :ref:`ssl-security` for more information on best practices. .. note:: @@ -97,6 +91,12 @@ The module provides the following classes: The *strict* parameter was removed. HTTP 0.9-style "Simple Responses" are no longer supported. + .. versionchanged:: 3.4.3 + This class now performs all the necessary certificate and hostname checks + by default. To revert to the previous, unverified, behavior + :func:`ssl._create_unverified_context` can be passed to the *context* + parameter. + .. class:: HTTPResponse(sock, debuglevel=0, method=None, url=None) |