Skip to main content

create_client_config

Function create_client_config 

Source
pub fn create_client_config(
    ca_certs: Vec<CertificateDer<'static>>,
    client_cert: Option<(Vec<CertificateDer<'static>>, PrivateKeyDer<'static>)>,
) -> Result<Arc<ClientConfig>>
Expand description

Create TLS client config for connecting to an OpenVPN server.

Uses the provided CA certificate to verify the server, with relaxed EKU checking for OpenVPN compatibility. Optionally presents a client certificate for mutual TLS.