Skip to main content

build_server_config

Function build_server_config 

Source
pub fn build_server_config(
    tls: &TlsConfig,
    http2_enabled: bool,
) -> Result<Arc<ServerConfig>, TlsError>
Expand description

Builds a rustls [ServerConfig] from tls, enforcing min_version and advertising ALPN h2+http/1.1 when http2_enabled (else http/1.1 only). Uses an explicit ring provider so the version floor is honored regardless of global-provider install ordering.