client_config_with_pinning

Function client_config_with_pinning 

Source
pub fn client_config_with_pinning(
    verifier: Arc<CertPinVerifier>,
    alpn: &[u8],
) -> ClientConfig
Expand description

Build a rustls ClientConfig that uses the pin verifier instead of the normal CA-based verification. The verifier is fail-closed: only a cert whose SPKI matches a configured pin is accepted. There is no fallback to CA verification (pinning REPLACES CA trust, it does not augment it — a pinned upstream that rotates its key pair MUST update its pins).