pub fn build_server_config(
settings: &TlsSettings,
) -> Result<ServerConfig, TlsError>Expand description
Build the [rustls::ServerConfig] for the API listener.
Loads the certificate chain and private key from disk, and — when a client CA is configured — a verifier that makes a valid client certificate mandatory.
§Arguments
settings- resolved TLS settings fromresolve_tls_settings
§Errors
Returns TlsError::CertRead, TlsError::KeyRead, TlsError::KeyParse,
TlsError::ClientCaRead or TlsError::ClientCaInvalid depending on which
piece of material failed to load. All are fatal at startup.