Skip to main content

rustls_config

Function rustls_config 

Source
pub(crate) fn rustls_config(
    roots: &[Certificate],
    identity: Option<&Identity>,
) -> Result<ClientConfig, TlsError>
Expand description

Builds the rustls configuration for a client that trusts roots in addition to the platform’s trust store, and that presents identity, if any, for client authentication.

Server certificates are verified by rustls-platform-verifier, as reqwest does by default, with the ExactRootMatch fallback.