Skip to content

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

@fabian4

Description

@fabian4

What is the problem your feature solves, or the need it fulfills?

The rustls connector does not honor per-peer CA configuration. peer.get_ca() is exposed on TlsPeer, but the rustls backend always uses the connector-level CA store for certificate verification, leading to failures (e.g. UnknownIssuer) when upstreams rely on custom CAs

The OpenSSL backend already supports this.

Describe the solution you'd like

Wire peer.get_ca() into the rustls connector. When a peer provides a CA, use it to build the RootCertStore for server certificate verification; otherwise keep the current behavior unchanged.

Describe alternatives you've considered

Using the OpenSSL/BoringSSL backend.

Additional context

The rustls connector source contains a TODO to set up CA / verification state from the peer. Happy to submit a PR once the approach is confirmed.

// TODO: setup CA/verify cert store from peer
// peer.get_ca() returns None by default. It must be replaced by the
// implementation of `peer`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions