Expand description
§Certon
Automatic HTTPS/TLS certificate management using the ACME protocol.
Certon provides production-grade automatic certificate management.
§Quick Start
use certon::Config;
#[tokio::main]
async fn main() -> certon::Result<()> {
let domains = vec!["example.com".into()];
let tls_config = certon::manage(&domains).await?;
// Use tls_config with your server...
Ok(())
}§Architecture
Configis the central entry point that coordinates the certificate lifecycle (obtain, renew, revoke, cache).AcmeIssuerandZeroSslIssuerimplement theCertIssuertrait to obtain certificates from ACME-compatible Certificate Authorities.CertCacheprovides an in-memory certificate store indexed by domain name for fast TLS handshake lookups.CertResolverimplementsrustls::server::ResolvesServerCertand plugs directly into arustls::ServerConfig.Storageis the persistence abstraction;FileStorageis the default filesystem-backed implementation.start_maintenanceruns background loops that renew certificates and refresh OCSP staples.Manageris an external certificate provider trait for custom sources.PreCheckervalidates domains before ACME issuance is attempted.HttpsRedirectHandlerredirects HTTP traffic to HTTPS.
Re-exports§
pub use account::prompt_user_agreement;pub use account::prompt_user_for_email;pub use acme_client::LETS_ENCRYPT_PRODUCTION;pub use acme_client::LETS_ENCRYPT_STAGING;pub use acme_client::RenewalInfo;pub use acme_client::RenewalWindow;pub use acme_client::ZEROSSL_PRODUCTION;pub use acme_client::ari_cert_id;pub use acme_issuer::AcmeIssuer;pub use acme_issuer::AcmeIssuerBuilder;pub use acme_issuer::CertIssuer;pub use acme_issuer::IssuedCertificate;pub use acme_issuer::Manager;pub use acme_issuer::PreChecker;pub use acme_issuer::Revoker;pub use cache::CacheOptions;pub use cache::CertCache;pub use certificates::Certificate;pub use config::CertificateSelector;pub use config::Config;pub use config::ConfigBuilder;pub use config::IssuerPolicy;pub use crypto::KeyType;pub use crypto::PrivateKey;pub use error::Error;pub use error::Result;pub use file_storage::FileStorage;pub use handshake::CertResolver;pub use handshake::OnDemandConfig;pub use maintain::MaintenanceConfig;pub use ocsp::OcspConfig;pub use redirect::HttpsRedirectHandler;pub use redirect::start_https_redirect;pub use solvers::DistributedSolver;pub use solvers::Dns01Solver;pub use solvers::DnsProvider;pub use solvers::Http01Solver;pub use solvers::Solver;pub use solvers::TlsAlpn01Solver;pub use storage::CertificateResource;pub use storage::KeyInfo;pub use storage::Storage;pub use storage::StorageKeys;pub use zerossl_issuer::ZeroSslApiIssuer;pub use zerossl_issuer::ZeroSslIssuer;
Modules§
- account
- ACME account management.
- acme_
client - Low-level ACME protocol client (RFC 8555).
- acme_
issuer - ACME certificate issuer — the main certificate acquisition orchestrator.
- async_
jobs - Async job queue with retry logic for ACME operations.
- cache
- In-memory certificate cache with domain name indexing.
- certificates
- Certificate wrapping, renewal logic, and subject validation.
- config
- Central configuration hub and certificate lifecycle management.
- crypto
- Cryptographic utilities for ACME certificate management.
- dns_
util - DNS utilities for ACME DNS-01 challenge solving.
- error
- Error types for the certon ACME certificate management library.
- file_
storage - File-system-based storage backend for certon.
- handshake
- TLS handshake certificate resolution.
- http_
handler - HTTP handlers for ACME HTTP-01 challenge responses.
- maintain
- Background certificate maintenance loops.
- ocsp
- OCSP (Online Certificate Status Protocol) stapling support.
- rate_
limiter - Rate limiting for ACME operations.
- redirect
- HTTP to HTTPS redirect handler.
- solvers
- ACME challenge solvers.
- storage
- Storage abstraction for certificate assets.
- zerossl_
issuer - ZeroSSL certificate issuers.
Functions§
- install_
default_ crypto_ provider - Install the default rustls
CryptoProviderbased on the enabled feature. - listen
- Obtain/load certificates for
domainsand bind a TLS listener onaddr. - manage
- Manage certificates for the given domains using a default configuration.
- manage_
async - Asynchronous certificate management for the given domains.
- manage_
sync - Synchronous-style certificate management for the given domains.
- start_
maintenance - Start background certificate maintenance for a
Config. - tls_
config - Create a TLS configuration for the given domains.