pub enum ClientAuthMode {
Disabled,
Optional,
Required,
}Expand description
Client certificate authentication mode for mutual TLS.
Controls whether the server requests and/or requires a client certificate
during the TLS handshake. Default is ClientAuthMode::Disabled (no
client certificate requested).
§TOML spelling
client_auth = "disabled" # default — no client certificate requested
client_auth = "optional" # certificate is requested but not required
client_auth = "required" # handshake fails if no valid certificate is presentedVariants§
Disabled
No client certificate is requested. This is the default and matches the previous behaviour (i.e. backward-compatible).
Optional
Client certificate is requested but the handshake succeeds even when
the client does not present one. The certificate chain, when present,
is still verified against client_ca_path.
Required
Client certificate is mandatory. The TLS handshake is aborted if the client does not present a certificate signed by the configured CA.
Trait Implementations§
Source§impl Clone for ClientAuthMode
impl Clone for ClientAuthMode
Source§fn clone(&self) -> ClientAuthMode
fn clone(&self) -> ClientAuthMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientAuthMode
impl Debug for ClientAuthMode
Source§impl Default for ClientAuthMode
impl Default for ClientAuthMode
Source§fn default() -> ClientAuthMode
fn default() -> ClientAuthMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ClientAuthMode
impl<'de> Deserialize<'de> for ClientAuthMode
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
Source§impl PartialEq for ClientAuthMode
impl PartialEq for ClientAuthMode
Source§fn eq(&self, other: &ClientAuthMode) -> bool
fn eq(&self, other: &ClientAuthMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ClientAuthMode
impl Serialize for ClientAuthMode
impl Eq for ClientAuthMode
impl StructuralPartialEq for ClientAuthMode
Auto Trait Implementations§
impl Freeze for ClientAuthMode
impl RefUnwindSafe for ClientAuthMode
impl Send for ClientAuthMode
impl Sync for ClientAuthMode
impl Unpin for ClientAuthMode
impl UnsafeUnpin for ClientAuthMode
impl UnwindSafe for ClientAuthMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.