pub struct TlsConfig {
pub cert_file: String,
pub key_file: String,
pub cert_chain_file: Option<String>,
pub client_auth: bool,
pub ca_file: Option<String>,
}Expand description
TLS configuration
Fields§
§cert_file: StringPath to certificate file
key_file: StringPath to private key file
cert_chain_file: Option<String>Certificate chain file (optional)
client_auth: boolEnable client authentication
ca_file: Option<String>CA file for client authentication
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn cert_chain_file(self, file: String) -> Self
pub fn cert_chain_file(self, file: String) -> Self
Set certificate chain file
Sourcepub fn client_auth(self, enabled: bool) -> Self
pub fn client_auth(self, enabled: bool) -> Self
Enable client authentication
Trait Implementations§
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