Skip to content

gh-149679: Document that cadata does not accept CRLs - #155701

Open
mangrisano wants to merge 1 commit into
python:mainfrom
mangrisano:gh-149679-document-cadata-no-crl
Open

gh-149679: Document that cadata does not accept CRLs#155701
mangrisano wants to merge 1 commit into
python:mainfrom
mangrisano:gh-149679-document-cadata-no-crl

Conversation

@mangrisano

@mangrisano mangrisano commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This documents that SSLContext.load_verify_locations() accepts CRLs only through cafile or capath, not through cadata.

cafile/capath are passed to OpenSSL's SSL_CTX_load_verify_locations, which loads CRLs in addition to certificates. cadata, on the other hand, is handled by _add_ca_certs in Modules/_ssl.c, which reads X.509 certificates only (d2i_X509_bio / PEM_read_bio_X509 + X509_STORE_add_cert). Supplying a CRL through cadata therefore raises SSLError: "cadata does not contain a certificate" rather than loading it.

The docs previously stated that the method "can also load certification revocation lists (CRLs)" without noting this restriction.

@read-the-docs-community

read-the-docs-community Bot commented Aug 13, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34052768 | 📁 Comparing 099c8e4 against main (6e079e5)

  🔍 Preview build  

1 file changed
± library/ssl.html

@mangrisano
mangrisano force-pushed the gh-149679-document-cadata-no-crl branch from da80d90 to 9ba3edf Compare August 13, 2026 13:38
@mangrisano
mangrisano force-pushed the gh-149679-document-cadata-no-crl branch from 9ba3edf to 099c8e4 Compare August 13, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant