Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2531)

Unified Diff: Doc/library/urllib.request.rst

Issue 14780: urllib.request could use the default CA store
Patch Set: Created 1 year ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Lib/test/test_urllib2_localnet.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/urllib.request.rst Fri May 11 13:11:02 2012 -0400
+++ b/Doc/library/urllib.request.rst Wed May 16 12:11:57 2012 -0700
@@ -16,7 +16,7 @@
The :mod:`urllib.request` module defines the following functions:
-.. function:: urlopen(url, data=None[, timeout], *, cafile=None, capath=None)
+.. function:: urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=True)
Open the URL *url*, which can be either a string or a
:class:`Request` object.
@@ -53,9 +53,14 @@
point to a directory of hashed certificate files. More information can
be found in :meth:`ssl.SSLContext.load_verify_locations`.
+ The *cadefault* parameter specifies whether to fall back to loading a
+ default certificate store defined by the underlying OpenSSL library if the
+ *cafile* and *capath* parameters are omitted.
+
.. warning::
- If neither *cafile* nor *capath* is specified, an HTTPS request
- will not do any verification of the server's certificate.
+ If neither *cafile* nor *capath* is specified, and *cadefault* is False,
+ an HTTPS request will not do any verification of the server's
+ certificate.
This function returns a file-like object that works as a :term:`context manager`,
with two additional methods from the :mod:`urllib.response` module
« no previous file with comments | « no previous file | Lib/test/test_urllib2_localnet.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7