Expand description
TLS certificate loading and hot-reload support (RFC 020).
§Two TLS setup modes
| Mode | When used | Cert changes |
|---|---|---|
with_single_cert | startup (static) | require restart |
ReloadableCertResolver | startup with hot-reload | soft reload via reload_certs |
§Outcome C (RFC 020)
TlsCertFile/TlsKeyFilechanges areSoftReload(no listener rebind).TlsEnabledtoggle is stillHardRestart(changes the listener type).- In-progress TLS handshakes that started before a reload complete with the old cert; new handshakes use the new cert atomically.
Structs§
- Reloadable
Cert Resolver - A
ResolvesServerCertimplementation that supports atomic in-place certificate rotation without restarting the listener (RFC 020). - TlsReload
Error - Error returned when
ReloadableCertResolver::reload_from_pathsfails.
Functions§
- build_
server_ config_ reloadable - Build a
ServerConfigbacked by aReloadableCertResolver. - build_
server_ config_ static - Build a static (non-reloadable)
ServerConfigfor the common case. - load_
certs - Load TLS/SSL certificates (leaf + any intermediates) from a PEM file.
- load_
private_ key - Load a TLS/SSL private key from a PEM file.