Skip to main content

Crate sova_acme

Crate sova_acme 

Source
Expand description

Let’s Encrypt ACME (HTTP-01) with TLS hot-reload for Sova.

use sova::{Acme, App, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let mut app = App::new();
    app.get("/", || async { "hello https" });
    app.install(
        Acme::lets_encrypt(["example.com"])
            .email("ops@example.com")
            .dir("./data/acme")
            .hsts(true),
    );
    // HTTPS: plugin attached TLS via App::use_tls during install
    app.listen(443).await
}

Structs§

Acme
Let’s Encrypt / ACME plugin (HTTP-01 on port 80 + background renewer).
AcmeFailed
Fired when an ACME issue/renew attempt fails.
AcmeHandle
AcmeStatus
CertMeta
CertificateIssued
Fired after the first successful certificate issuance (or replace of placeholder).
CertificateRenewed
Fired after a successful renewal of an existing certificate.