pub struct ClientTlsConfig {
pub ca: PemSource,
pub client_cert: Option<PemSource>,
pub client_key: Option<PemSource>,
pub alpn: Vec<Vec<u8>>,
}Expand description
Client-side TLS configuration.
Construct via ClientTlsConfig::builder.
Fields§
§ca: PemSourceTrusted CA bundle for verifying the server’s certificate.
client_cert: Option<PemSource>Client certificate chain (None = no client cert).
client_key: Option<PemSource>Client private key.
alpn: Vec<Vec<u8>>ALPN protocol list, in preference order.
Implementations§
Source§impl ClientTlsConfig
impl ClientTlsConfig
Sourcepub fn builder() -> ClientTlsConfigBuilder
pub fn builder() -> ClientTlsConfigBuilder
Start a new builder.
Sourcepub fn into_rustls_config(self) -> Result<ClientConfig, TlsError>
pub fn into_rustls_config(self) -> Result<ClientConfig, TlsError>
Build a rustls::ClientConfig.
Reads PEM sources, builds a RootCertStore from CA, optionally adds the client cert+key for mTLS, and applies ALPN.
All I/O surfaces here.
Auto-installs the ring CryptoProvider if no provider is set process-wide.
Trait Implementations§
Source§impl Clone for ClientTlsConfig
impl Clone for ClientTlsConfig
Source§fn clone(&self) -> ClientTlsConfig
fn clone(&self) -> ClientTlsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClientTlsConfig
impl RefUnwindSafe for ClientTlsConfig
impl Send for ClientTlsConfig
impl Sync for ClientTlsConfig
impl Unpin for ClientTlsConfig
impl UnsafeUnpin for ClientTlsConfig
impl UnwindSafe for ClientTlsConfig
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