Skip to content

Support custom peer identity verification while retaining standard TLS authentication #2106

Open

Description

@jjaegerman

Proposal: expose an optional synchronous TLSConfig.peer_identity_verifier(cert_der: bytes) -> None callback. The Rust bridge validates the trust chain, validity and server-auth usage before calling it, and retains rustls handshake-signature verification. The callback replaces DNS hostname matching only; SNI and HTTP/2 authority remain unchanged. An exception or non-None return rejects the handshake. Require explicit root CAs and reject combinations with verification_server_name.

This supports application identities encoded in private X.509 extensions without duplicating cryptographic verification. It builds on Core’s TlsOptions.server_cert_verifier, is distinct from #2103, and needs real handshake negative tests. Callbacks must be fast, thread-safe, synchronous and independent of SDK calls.

Opening for design discussion per CONTRIBUTING.md; a draft implementation will follow. Default TLS behavior is unchanged.

🤖 jjaegerman’s Aimee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions