tls: reload certs on REHASH (renewed cert applies without restart) and add per-hostname SNI via tls_sni

This commit is contained in:
Jean Chevronnet 2026-08-16 23:35:36 +00:00
parent a6293d5bbc
commit 471fc00dfc
4 changed files with 129 additions and 22 deletions

View file

@ -282,6 +282,13 @@ impl Server {
srv.silent_service = silent_service;
}
}
// reload TLS certs from disk so a renewed cert applies without a restart
// (no-op when TLS isn't configured).
if let Some(r) = crate::tls::TLS_RELOAD.get() {
if let Err(e) = r.reload() {
eprintln!("[rehash] TLS cert reload failed: {e}");
}
}
}
/// Remember an identity for WHOWAS (capped ring, newest first).