Rustls CRL Refresh
A process-wide Certificate Revocation List cache and a pair of
refreshable rustls verifiers built on top of it. Lets a long-running
server rotate CRL bytes without rebuilding Arc<ServerConfig> /
Arc<ClientConfig> — handy when the surrounding code keeps
Arc-identity-keyed connection pools and you don't want to churn
them on every CRL refresh.
Features
CrlCache— keyed by source identity (File(PathBuf)orUrl(String)). Stores the latest DER bytes plus the parsednextUpdate. The cache fetches via a pluggableCrlFetcher— production wires up an HTTP /tokio::fsfetcher; tests substitute in-memory mocks.RefreshableClientCertVerifier/RefreshableServerCertVerifier— wrap aWebPkiClientVerifier/WebPkiServerVerifierreconstruction per handshake against the latest cache snapshot. Implement rustls'sClientCertVerifier/ServerCertVerifiertraits so you slot them straight into aServerConfig/ClientConfigbuilder.- Per-source failure policy — each source is registered as
tolerate(keep using last-known bytes when refresh fails) orreject(fail handshakes once unavailable). Both classes are surfaced throughtracingevents.
Example
use Arc;
use async_trait;
use ;
;
#
License
Released under the MIT License © 2026 Canmi