pub struct TlsConfigBuilder { /* private fields */ }Expand description
Builder for TlsClientConfig.
Implementations§
Source§impl TlsConfigBuilder
impl TlsConfigBuilder
Sourcepub fn server_name(self, server_name: ServerName) -> Self
pub fn server_name(self, server_name: ServerName) -> Self
Sets the server name.
Sourcepub fn root_store(self, store: RootCertStore) -> Self
pub fn root_store(self, store: RootCertStore) -> Self
Sets the root certificates to use for verifying the server’s certificate.
Sourcepub fn client_auth(self, cert_key: (Vec<CertificateDer>, PrivateKeyDer)) -> Self
pub fn client_auth(self, cert_key: (Vec<CertificateDer>, PrivateKeyDer)) -> Self
Sets a DER-encoded certificate chain and a matching private key for client authentication.
Often the chain will consist of a single end-entity certificate.
§Arguments
-
cert_key- A tuple containing the certificate chain and the private key.- Each certificate in the chain must be in the X.509 format.
- The key must be in the ASN.1 format (either PKCS#8 or PKCS#1).
Sourcepub fn build(self) -> Result<TlsClientConfig, TlsConfigError>
pub fn build(self) -> Result<TlsClientConfig, TlsConfigError>
Builds the TLS configuration.
Trait Implementations§
Source§impl Debug for TlsConfigBuilder
impl Debug for TlsConfigBuilder
Source§impl Default for TlsConfigBuilder
impl Default for TlsConfigBuilder
Source§fn default() -> TlsConfigBuilder
fn default() -> TlsConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TlsConfigBuilder
impl RefUnwindSafe for TlsConfigBuilder
impl Send for TlsConfigBuilder
impl Sync for TlsConfigBuilder
impl Unpin for TlsConfigBuilder
impl UnwindSafe for TlsConfigBuilder
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more