diff options
author | Christian Heimes <christian@cheimes.de> | 2013-06-09 16:02:55 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-06-09 16:02:55 (GMT) |
commit | 6d7ad13a458afdf2cbdd0c3349b0589d7776cc8a (patch) | |
tree | 47e14221e1b28d34be82fe6a3e5fa554c03f51a1 /Doc/library/ssl.rst | |
parent | 302b8c31ecefba371271ca51359ef30fcb3ddbcd (diff) | |
download | cpython-6d7ad13a458afdf2cbdd0c3349b0589d7776cc8a.zip cpython-6d7ad13a458afdf2cbdd0c3349b0589d7776cc8a.tar.gz cpython-6d7ad13a458afdf2cbdd0c3349b0589d7776cc8a.tar.bz2 |
Issue #18143: Implement ssl.get_default_verify_paths() in order to debug
the default locations for cafile and capath.
Diffstat (limited to 'Doc/library/ssl.rst')
-rw-r--r-- | Doc/library/ssl.rst | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 2f8b9a2..5f46de1 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -343,6 +343,23 @@ Certificate handling Given a certificate as an ASCII PEM string, returns a DER-encoded sequence of bytes for that same certificate. +.. function:: get_default_verify_paths() + + Returns a named tuple with paths to OpenSSL's default cafile and capath. + The paths are the same as used by + :meth:`SSLContext.set_default_verify_paths`. The return value is a + :term:`named tuple` ``DefaultVerifyPaths``: + + * :attr:`cafile` - resolved path to cafile or None if the file doesn't exist, + * :attr:`capath` - resolved path to capath or None if the directory doesn't exist, + * :attr:`openssl_cafile_env` - OpenSSL's environment key that points to a cafile, + * :attr:`openssl_cafile` - hard coded path to a cafile, + * :attr:`openssl_capath_env` - OpenSSL's environment key that points to a capath, + * :attr:`openssl_capath` - hard coded path to a capath directory + + .. versionadded:: 3.4 + + Constants ^^^^^^^^^ @@ -787,7 +804,8 @@ to speed up repeated connections from the same clients. other peers' certificates when :data:`verify_mode` is other than :data:`CERT_NONE`. At least one of *cafile* or *capath* must be specified. - The *cafile* string, if present, is the path to a file of concatenated + The *cafile* string, if present, is the p + ath to a file of concatenated CA certificates in PEM format. See the discussion of :ref:`ssl-certificates` for more information about how to arrange the certificates in this file. |