Expand description
Neutral rustls server identity, trust, client-authentication, and reload configuration.
This crate intentionally contains no EggServe, Eggress, HTTP runtime, proxy, tracing, CLI, or Python dependencies. Applications own transport adapters, filesystem watching, and operational logging.
The crate provides bounded PEM parsing, validated SNI identity selection, explicit WebPKI client authentication, and atomic replacement of immutable snapshots for new handshakes. It does not provide certificate management, filesystem watching, or application-level TLS policy.
Structs§
- TlsReload
Handle - Atomic reload handle for TLS identity/trust state (Plan 203 Track F).
- TlsServer
Config - Validated production TLS identity configuration (Plan 203 Tracks A–C).
- TlsServer
Config Builder - Builder for
TlsServerConfig.
Enums§
- Client
Auth Mode - Client-certificate authentication policy (Plan 203 Track C).
- TlsError
Constants§
- MAX_
ALPN_ PROTOCOLS - Maximum ALPN protocols advertised by one server configuration.
- MAX_
ALPN_ PROTOCOL_ LEN - Maximum bytes per ALPN protocol identifier (TLS wire limit).
- MAX_
CRLS - Maximum CRLs for client authentication.
- MAX_
IDENTITY_ CHAIN - Maximum certificates per server identity chain.
- MAX_
SNI_ LEN - Maximum DNS length for an SNI identity (DNS limit, without
*.prefix). - MAX_
TLS_ IDENTITIES - Maximum SNI identities per
TlsServerConfig(exact + wildcard combined). - MAX_
TRUST_ PEM_ BYTES - Maximum PEM bytes accepted for trust-root/CRL parsing (1 MiB).
- MAX_
TRUST_ ROOTS - Maximum trust anchors for client authentication.
Functions§
- http_
alpn_ protocols - HTTP ALPN advertisement for the
TlsServerConfigBuilder::http2convenience:h2beforehttp/1.1when enabled, elsehttp/1.1only. - load_
identity - Load one certificate chain and exactly one private key from PEM files.
- load_
tls_ config - Load a rustls server configuration from PEM certificate and key files.
- load_
tls_ config_ with_ alpn - Load a rustls server configuration with an explicit ALPN advertisement.
- load_
tls_ config_ with_ http2 - Load a rustls server configuration and explicitly choose the advertised application protocols.
- parse_
crls_ pem - Parse CRLs from PEM bytes (bounded, validated at load).
- parse_
identity_ pem - Parse one identity from PEM bytes (caller-supplied in-memory material).
- parse_
trust_ roots_ pem - Parse trust anchors from PEM bytes (bounded, validated at load).