Skip to content

Add as_cryptography parameter to Connection.get_client_ca_list#1508

Open
alex wants to merge 1 commit into
mainfrom
claude/client-ca-list-as-cryptography
Open

Add as_cryptography parameter to Connection.get_client_ca_list#1508
alex wants to merge 1 commit into
mainfrom
claude/client-ca-list-as-cryptography

Conversation

@alex

@alex alex commented Jun 7, 2026

Copy link
Copy Markdown
Member

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. This is split out from the X509Name deprecation work so that get_client_ca_list has 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 (the tests-cryptography-main jobs pass).

https://claude.ai/code/session_01KzTRkDmWNuEfCubRUhVit5

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
@alex alex force-pushed the claude/client-ca-list-as-cryptography branch 2 times, most recently from 31275cf to 922eecf Compare June 7, 2026 22:19
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
@alex alex force-pushed the claude/client-ca-list-as-cryptography branch from 922eecf to 2f719f9 Compare June 7, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants