pub struct Builder { /* private fields */ }
Implementations§
source§impl Builder
impl Builder
pub fn config_mut(&mut self) -> &mut Builder
pub fn with_application_protocols<P, I>( self, protocols: P ) -> Result<Builder, Error>
pub fn with_certificate<C, PK>(
self,
certificate: C,
private_key: PK
) -> Result<Builder, Error>where
C: IntoCertificate,
PK: IntoPrivateKey,
pub fn with_trusted_certificate<C>(
self,
certificate: C
) -> Result<Builder, Error>where
C: IntoCertificate,
sourcepub fn with_empty_trust_store(self) -> Result<Builder, Error>
pub fn with_empty_trust_store(self) -> Result<Builder, Error>
Clears the default trust store for this client.
By default, the trust store is initialized with common trust store locations for the host operating system. By invoking this method, the trust store will be cleared.
Note that call ordering matters. The caller should call this
method before making any calls to with_trusted_certificate()
.
Calling this method after a method that modifies the trust store will clear it.
sourcepub fn with_client_authentication(self) -> Result<Builder, Error>
pub fn with_client_authentication(self) -> Result<Builder, Error>
Configures this server instance to require client authentication (mutual TLS).
sourcepub fn with_verify_client_certificate_handler<T>(
self,
handler: T
) -> Result<Builder, Error>where
T: 'static + VerifyHostNameCallback,
👎Deprecated: use with_verify_host_name_callback
instead
pub fn with_verify_client_certificate_handler<T>(
self,
handler: T
) -> Result<Builder, Error>where
T: 'static + VerifyHostNameCallback,
with_verify_host_name_callback
insteadSet the application level certificate verification handler which will be invoked on this server instance when a client certificate is presented during the mutual TLS handshake.
sourcepub fn with_verify_host_name_callback<T>(
self,
handler: T
) -> Result<Builder, Error>where
T: 'static + VerifyHostNameCallback,
pub fn with_verify_host_name_callback<T>(
self,
handler: T
) -> Result<Builder, Error>where
T: 'static + VerifyHostNameCallback,
Set the host name verification callback.
This will be invoked when a client certificate is presented during a mutual TLS handshake.