Skip to content

feat: Implement per-peer CA support in TLS configuration#795

Closed
fabian4 wants to merge 1 commit intocloudflare:mainfrom
fabian4:rustls-per-peer-ca-support
Closed

feat: Implement per-peer CA support in TLS configuration#795
fabian4 wants to merge 1 commit intocloudflare:mainfrom
fabian4:rustls-per-peer-ca-support

Conversation

@fabian4
Copy link
Contributor

@fabian4 fabian4 commented Jan 17, 2026

This PR fixes the rustls connector to honor per-peer CA configuration when establishing upstream TLS connections. Fixes #792.

The change wires Peer::get_ca() into rustls by constructing a per-peer RootCertStore when provided, using it consistently for both ClientConfig root certificates and WebPkiServerVerifier, with a clean fallback to the global CA store when absent.

@duke8253 duke8253 self-assigned this Jan 23, 2026
@duke8253 duke8253 added the bug Something isn't working label Jan 23, 2026
@duke8253 duke8253 added the Accepted This change is accepted by us and merged to our internal repo label Mar 18, 2026
johnhurt pushed a commit that referenced this pull request Mar 20, 2026
Includes-commit: 08133c6
Replicated-from: #795

Co-authored-by: Fei Deng <fdeng@cloudflare.com>
johnhurt pushed a commit that referenced this pull request Mar 20, 2026
Includes-commit: 08133c6
Replicated-from: #795

Co-authored-by: Fei Deng <fdeng@cloudflare.com>
@johnhurt
Copy link
Contributor

Hey, this made it into #842 — your name is on the commit. Thanks for the contribution!

@johnhurt johnhurt closed this Mar 21, 2026
@fabian4 fabian4 deleted the rustls-per-peer-ca-support branch March 24, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted This change is accepted by us and merged to our internal repo bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

per-peer CA (peer.get_ca()) is ignored during certificate verification

3 participants