pub struct ClientTLSConfigBuilder { /* private fields */ }
Expand description
A TLS client configuration builder.
Exposes various options for configuring a client’s TLS configuration that would otherwise be cumbersome to configure, and provides sane defaults for many common options.
§Missing
- ability to configure client authentication
Implementations§
Source§impl ClientTLSConfigBuilder
impl ClientTLSConfigBuilder
pub fn new() -> Self
Sourcepub fn with_max_tls12_resumption_sessions(self, max: usize) -> Self
pub fn with_max_tls12_resumption_sessions(self, max: usize) -> Self
Sets the maximum number of TLS 1.2 sessions to cache.
Defaults to 8.
Sourcepub fn with_root_cert_store(self, store: RootCertStore) -> Self
pub fn with_root_cert_store(self, store: RootCertStore) -> Self
Sets the root certificate store to use for the client.
Defaults to the “default” root certificate store initialized from the platform. (See load_platform_root_certificates
.)
Sourcepub fn build(self) -> Result<ClientConfig, GenericError>
pub fn build(self) -> Result<ClientConfig, GenericError>
Builds the client TLS configuration.
§Errors
If the default root cert store (see load_platform_root_certificates
) has not been initialized, and a root
cert store has not been provided, or if the resulting configuration is not FIPS compliant, an error will be
returned.
Auto Trait Implementations§
impl Freeze for ClientTLSConfigBuilder
impl RefUnwindSafe for ClientTLSConfigBuilder
impl Send for ClientTLSConfigBuilder
impl Sync for ClientTLSConfigBuilder
impl Unpin for ClientTLSConfigBuilder
impl UnwindSafe for ClientTLSConfigBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more