Expand description
Automatic TLS certificate issuance and renewal via ACME (RFC 8555). ACME (RFC 8555) certificate lifecycle for flexd.
Covers contract invariants 67–77 and §7 criteria C50–C58: automatic issuance
on startup, HTTP-01 / TLS-ALPN-01 / DNS-01 challenge response, EAB, renewal,
Retry-After-aware backoff, and fail-closed behaviour (no silent self-signed
fallback). The actual ACME protocol is driven by instant-acme; this module
adds the flexd-specific glue: a challenge store shared with the request
handler and TLS resolver, a custom HTTP client that trusts an optional test
root and surfaces Retry-After, and the ensure_cert orchestration.
Structs§
- Acme
Manager - Orchestrates issuance for one TLS server block.
- Acme
Resolver - rustls certificate resolver. Serves the staged TLS-ALPN-01 challenge cert
when (and only when) the client negotiates the
acme-tls/1ALPN protocol (RFC 8737); all ordinary traffic gets the issued/staticdefaultcert. - Challenge
Store - Token paths and challenge certs awaiting validation, shared by reference
(cheap
Arcclone) into the request handler (HTTP-01) and the TLSResolvesServerCerthook (TLS-ALPN-01). Reads happen on synchronous paths (rustls’ resolver is sync), so the maps usestd::sync::RwLock, never held across an.await.
Functions§
- load_
certified_ key - Load a cert chain + key from disk into a
CertifiedKeyfor the resolver’s default (the issued or static cert).