pub struct TlsConfig {
pub skip_verify: bool,
pub ca_file: Option<String>,
pub cert_file: Option<String>,
pub key_file: Option<String>,
pub server_name: Option<String>,
pub min_version: TlsVersion,
}Expand description
TLS material and peer-verification settings shared by transport crates.
Fields§
§skip_verify: boolDisables peer certificate verification. Intended only for controlled local/test use.
ca_file: Option<String>Path to a PEM-encoded CA bundle used to verify peers.
cert_file: Option<String>Path to a PEM-encoded certificate.
key_file: Option<String>Path to a PEM-encoded private key paired with cert_file.
server_name: Option<String>Override the certificate server name.
min_version: TlsVersionMinimum TLS version. Defaults to TLS 1.2 while rustls prefers TLS 1.3.
Implementations§
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 UnsafeUnpin 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