Skip to main content

resolve_rustls_config

Function resolve_rustls_config 

Source
pub async fn resolve_rustls_config(
    tls_config: &TlsConfig,
    account_cfg: &AccountZoneConfig,
    service_cert: Option<&PathBuf>,
    service_key: Option<&PathBuf>,
) -> Result<Option<ResolvedTlsConfig>>
Expand description

Resolve HTTP TLS configuration and any protocol-specific acceptor.

Resolution order:

  1. tls_config.enabled == false → None (plain HTTP)
  2. Both service_cert + service_key set → per-service PEM files (overrides mode)
  3. mode = "acme" → obtain/renew via ACME and use its challenge-aware acceptor
  4. Otherwise → shared self-signed / files mode materials