Module tls

Module tls 

Source
Expand description

TLS and ACME configuration builder utilities.

This module is responsible for translating server configuration entries into concrete TLS listener state, SNI resolvers, and ACME configurations.

Responsibilities include:

  • Manual TLS certificate loading
  • Automatic TLS (ACME) configuration
  • On-demand vs eager ACME flows
  • Resolver wiring per TLS port

This module is intentionally side-effectful and mutates TlsBuildContext as part of the build process.

Structsยง

TlsBuildContext
Accumulates TLS and ACME-related state while building listener configuration.

Functionsยง

build_eager_acme ๐Ÿ”’
Builds an eager (startup-time) ACME configuration.
build_on_demand_acme ๐Ÿ”’
Builds an on-demand ACME configuration.
ensure_tls_port_resolver ๐Ÿ”’
Ensures that a TLS SNI resolver exists for the given port.
handle_automatic_tls
Configures automatic TLS (ACME) for a server configuration.
handle_manual_tls
Configures a manually provided TLS certificate and private key.
handle_nonencrypted_ports
Handles non-encrypted ports for a server configuration.
manual_tls_entry
Obtains the certificate and key for a manual TLS entry in server configuration.
parse_challenge_type ๐Ÿ”’
Parses ACME challenge type from server configuration.
read_default_port
Reads the default port from the given server configuration.
resolve_sni_hostname
Resolves the SNI hostname from the given filters.
should_skip_server
Checks if the server should be skipped.