pub struct TlsConfig {
pub required: bool,
pub ca_file: Option<String>,
pub cert_file: Option<String>,
pub key_file: Option<String>,
pub cert_password: Option<String>,
pub accept_invalid_certs: bool,
}Expand description
TLS configuration for secure connections.
Fields§
§required: boolIf true, enable TLS/SSL.
ca_file: Option<String>Path to the CA certificate file.
cert_file: Option<String>Path to the client certificate file (PEM).
key_file: Option<String>Path to the client private key file (PEM).
cert_password: Option<String>Password for the private key (if encrypted).
accept_invalid_certs: boolIf true, disable server certificate verification (insecure).
Implementations§
Source§impl TlsConfig
impl TlsConfig
pub fn is_mtls_client_configured(&self) -> bool
pub fn is_tls_server_configured(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlsConfig
impl<'de> Deserialize<'de> for TlsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TlsConfig
impl RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnwindSafe for TlsConfig
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