Skip to main content

connect_pinned_hashes

Function connect_pinned_hashes 

Source
pub async fn connect_pinned_hashes(
    addr: SocketAddr,
    cert_hashes: &[[u8; 32]],
) -> Result<Session>
Expand description

Build a quinn WebTransport client session against a self-signed server, accepting the leaf cert if its SHA-256 fingerprint is any of cert_hashes (QuicServerAuth::accept_cert_hashes — a set so rotation can overlap). Hermetic: dials an IP-literal URL so no DNS lookup or network egress occurs.