Skip to main content

verify_peer_cert_pinned

Function verify_peer_cert_pinned 

Source
pub fn verify_peer_cert_pinned(
    session: &Session,
    accept: &[[u8; 32]],
) -> Result<()>
Expand description

Verify the peer’s leaf-cert SHA-256 is one of accept — the post-connect pin check for the WebPKI+pin mode (CA validation runs in the handshake; this adds the pin on top). Call immediately after connect, before any RPC. The cert fingerprint is public, so a plain comparison is fine (no secret to leak).