#[non_exhaustive]pub enum InvalidSniPolicy {
RejectAll,
IgnoreIpAddresses,
IgnoreAll,
}
Expand description
A policy describing how an invalid Server Name Indication (SNI) value from a client is handled by the server.
The only valid form of SNI according to relevant RFCs (RFC6066, RFC1035) is non-IP-address host name, however some misconfigured clients may send a bare IP address, or another invalid value. Some servers may wish to ignore these invalid values instead of producing an error.
By default, Rustls will ignore invalid values that are an IP address (the most common misconfiguration) and error for all other invalid values.
When an SNI value is ignored, Rustls treats the client as if it sent no SNI at all.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RejectAll
Reject all ClientHello messages that contain an invalid SNI value.
IgnoreIpAddresses
Ignore an invalid SNI value in ClientHello messages if the value is an IP address.
“Ignoring SNI” means accepting the ClientHello message, but acting as if the client sent no SNI.
IgnoreAll
Ignore all invalid SNI in ClientHello messages.
“Ignoring SNI” means accepting the ClientHello message, but acting as if the client sent no SNI.
Trait Implementations§
Source§impl Clone for InvalidSniPolicy
impl Clone for InvalidSniPolicy
Source§fn clone(&self) -> InvalidSniPolicy
fn clone(&self) -> InvalidSniPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more