pub struct TlsConfig {
pub enabled: bool,
pub ca_path: Option<PathBuf>,
pub cert_path: Option<PathBuf>,
pub key_path: Option<PathBuf>,
pub server_name: Option<ServerName<'static>>,
}
Expand description
Configuration for establishing a TLS connection to server with optional mTLS.
Fields§
§enabled: bool
Enable TLS connections to the server.
ca_path: Option<PathBuf>
Path to a custom certificate authority. If not supplied, default root certificates
from the webpki_roots
crate are used.
cert_path: Option<PathBuf>
Path to a PEM format client certificate for mTLS. If not supplied, no client authentication is used when connecting to the server.
key_path: Option<PathBuf>
Path to a PEM format client key for mTLS. If not supplied, no client authentication is used when connecting to the server.
server_name: Option<ServerName<'static>>
Name of the server for validating its certificate. If not supplied, the hostname of the server is used instead.
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