Function wtransport::tls::client::build_default_tls_config

source ·
pub fn build_default_tls_config(root_store: Arc<RootCertStore>) -> ClientConfig
Expand description

Builds a default TLS client configuration with safe defaults.

This function constructs a TLS client configuration with safe defaults. It utilizes the provided RootCertStore to validate server certificates during the TLS handshake.

Client authentication is not required in this configuration.

§Arguments

  • root_store: An Arc containing the RootCertStore with trusted root certificates. To obtain a RootCertStore, one can use the build_native_cert_store function, which loads the platform’s certificate authorities (CAs).