pub struct TlsConfig {
pub sni: Option<String>,
pub cert_file: PathBuf,
pub key_file: PathBuf,
pub client_auth: Option<ClientAuthConfig>,
}Expand description
Listener-side TLS termination config — paths to the cert chain + private key in PEM, plus an optional SNI hostname this cert serves.
sni: None marks the cert as the listener’s default — used when
the ClientHello has no SNI extension, or when the SNI doesn’t
match any of the listener’s Some(_) entries. A listener has at
most one default cert.
SNI hostnames are normalised to ASCII-lowercase at every ingest
boundary per 08-tls.md § SNI normalization; comparison against
rustls’s already-lowercased ClientHello::server_name() is then
byte-for-byte.
Fields§
§sni: Option<String>§cert_file: PathBuf§key_file: PathBuf§client_auth: Option<ClientAuthConfig>Listener-side mTLS — per 08-tls.md § Client certificate
verification. Per-rule input; the lower pass aggregates each
rule’s client_auth into one ClientAuthSpec per listener
address (rules on the same listener must agree, else compile
error). None keeps the listener at ClientAuth::None.