ssl.get_default_verify_paths
Prev: ssl.DER_cert_to_PEM_cert | Up: ssl | Next: ssl.get_protocol_name
Rel: ssl.AlertDescription, ssl.cert_time_to_seconds, ssl.CertificateError, ssl.create_connection
Ref: docs.python.org — ssl.get_default_verify_paths
Tags: #public #python3 #stdlib #ssl
Import
import ssl
from ssl import get_default_verify_paths
Signature & Overview
ssl.get_default_verify_paths()
Return paths to default cafile and capath.
Usage
import ssl
paths = ssl.get_default_verify_paths()
assert paths.openssl_cafile_env == "SSL_CERT_FILE"
Gotchas
- First thing to check when TLS fails with
CERTIFICATE_VERIFY_FAILED: Shows the exactcafile/capathOpenSSL is looking at.
REPL Inspect
from ssl import get_default_verify_paths
help(get_default_verify_paths)
Linked from
Related notes
- tuts/python3/stdlib_module/ssl/DER_cert_to_PEM_cert Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/get_protocol_name Linked here; links to this page; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ssl/AlertDescription Linked here; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/cert_time_to_seconds Linked here; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/CertificateError Linked here; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/create_connection Linked here; shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/create_default_context shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/DefaultVerifyPaths shared tags: #ssl, #stdlib
- tuts/python3/stdlib_module/ssl/get_server_certificate shared tags: #ssl, #stdlib