#[non_exhaustive]pub struct TlsConfig {
pub cert_path: Option<PathBuf>,
pub key_path: Option<PathBuf>,
pub ca_path: Option<PathBuf>,
pub require_client_auth: bool,
pub server_name: Option<String>,
pub insecure_accept_any_cert: bool,
}Expand description
TLS configuration knobs surfaced on RemoteSettings.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cert_path: Option<PathBuf>PEM-encoded certificate chain.
key_path: Option<PathBuf>PEM-encoded private key.
ca_path: Option<PathBuf>PEM-encoded trust roots (defaults to the OS root store).
require_client_auth: boolRequire client cert verification (mTLS).
server_name: Option<String>SNI hostname when initiating outbound connections.
insecure_accept_any_cert: boolAllow unknown roots (dev / self-signed). MUST be false in
production.
Implementations§
Source§impl TlsConfig
impl TlsConfig
pub fn enabled(&self) -> bool
pub fn with_cert(self, p: impl Into<PathBuf>) -> Self
pub fn with_key(self, p: impl Into<PathBuf>) -> Self
pub fn with_ca(self, p: impl Into<PathBuf>) -> Self
pub fn with_server_name(self, name: impl Into<String>) -> Self
pub fn with_client_auth(self, on: bool) -> Self
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 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