Skip to content

Add as_cryptography parameter to Connection.get_client_ca_list#1508

Merged
reaperhulk merged 1 commit into
mainfrom
claude/client-ca-list-as-cryptography
Jun 12, 2026
Merged

Add as_cryptography parameter to Connection.get_client_ca_list#1508
reaperhulk merged 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 4 times, most recently from 3d8b507 to 2f719f9 Compare June 12, 2026 20:04
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 2f719f9 to fb3e7c7 Compare June 12, 2026 20:12
@reaperhulk reaperhulk enabled auto-merge (squash) June 12, 2026 20:14
@reaperhulk reaperhulk merged commit 1dc08be into main Jun 12, 2026
74 checks passed
@alex alex deleted the claude/client-ca-list-as-cryptography branch June 12, 2026 20:16
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.

3 participants