pub struct TlsConfig {
pub tls_required: bool,
pub mtls_required: bool,
pub min_version: TlsVersion,
}Expand description
TLS Security Configuration
Defines what TLS/SSL requirements must be met for a connection. This is typically derived from a SecurityProfile.
Fields§
§tls_required: boolIf true, all connections must be HTTPS (TLS required)
mtls_required: boolIf true, all connections must include a valid client certificate
min_version: TlsVersionMinimum allowed TLS version (enforce via check 2)
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
Create a permissive TLS configuration (for development/staging)
- HTTPS optional
- Client certs optional
- TLS 1.2 minimum (if TLS is used)
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
impl Eq for TlsConfig
impl StructuralPartialEq for TlsConfig
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
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.