Add as_cryptography parameter to Connection.get_client_ca_list#1508
Open
alex wants to merge 1 commit into
Open
Add as_cryptography parameter to Connection.get_client_ca_list#1508alex wants to merge 1 commit into
alex wants to merge 1 commit into
Conversation
alex
pushed a commit
that referenced
this pull request
Jun 7, 2026
Deprecates X509Name, X509.get_issuer, X509.set_issuer, X509.get_subject, X509.set_subject, and Context.set_client_ca_list in favor of the APIs in cryptography.x509. Connection.get_client_ca_list is not deprecated; it is gaining an as_cryptography parameter separately (#1508). https://claude.ai/code/session_01KzTRkDmWNuEfCubRUhVit5
31275cf to
922eecf
Compare
When True is passed, the client CA names are returned as cryptography.x509.Name objects rather than OpenSSL.crypto.X509Name, matching the as_cryptography parameter on get_certificate, get_peer_certificate, get_peer_cert_chain, and get_verified_chain. The conversion uses x509.Name.from_bytes, which requires cryptography >= 49, so this should be merged after the minimum cryptography version is raised. https://claude.ai/code/session_01KzTRkDmWNuEfCubRUhVit5
922eecf to
2f719f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
Trueis passed, the client CA names are returned ascryptography.x509.Nameobjects rather thanOpenSSL.crypto.X509Name, matching theas_cryptographyparameter onget_certificate,get_peer_certificate,get_peer_cert_chain, andget_verified_chain. This is split out from the X509Name deprecation work so thatget_client_ca_listhas a non-deprecated form going forward.The conversion uses
x509.Name.from_bytes(pyca/cryptography#14980) unconditionally, so this is to be merged after the minimum supported cryptography version is raised to 49. Until then, the mypy job and the new test will fail on CI jobs that run against released cryptography (thetests-cryptography-mainjobs pass).https://claude.ai/code/session_01KzTRkDmWNuEfCubRUhVit5