Skip to main content

RustlsMtlsExt

Trait RustlsMtlsExt 

Source
pub trait RustlsMtlsExt {
    // Required methods
    fn server_config_mtls_rustls(&self) -> ServerConfig;
    fn server_config_mtls_rustls_with_provider(
        &self,
        provider: Arc<CryptoProvider>,
    ) -> ServerConfig;
    fn client_config_mtls_rustls(&self) -> ClientConfig;
    fn client_config_mtls_rustls_with_provider(
        &self,
        provider: Arc<CryptoProvider>,
    ) -> ClientConfig;
}
Expand description

Extension trait for mutual TLS configurations.

Required Methods§

Source

fn server_config_mtls_rustls(&self) -> ServerConfig

Build a ServerConfig that requires client certificates verified against the chain’s root CA.

Source

fn server_config_mtls_rustls_with_provider( &self, provider: Arc<CryptoProvider>, ) -> ServerConfig

Build a ServerConfig for mTLS with an explicit CryptoProvider.

Source

fn client_config_mtls_rustls(&self) -> ClientConfig

Build a ClientConfig that presents the leaf certificate as a client certificate and trusts the root CA.

Source

fn client_config_mtls_rustls_with_provider( &self, provider: Arc<CryptoProvider>, ) -> ClientConfig

Build a ClientConfig for mTLS with an explicit CryptoProvider.

Implementations on Foreign Types§

Source§

impl RustlsMtlsExt for X509Chain

Available on crate features x509 and server-config and client-config only.

Implementors§