Skip to main content

Crate weirdnet_tls

Crate weirdnet_tls 

Source
Expand description

TLS certificates for Weirdnet hosts.

  • acme: certificates from an ACME CA (Let’s Encrypt or any RFC 8555 directory) over instant-acme, with TLS-ALPN-01, HTTP-01 and DNS-01, several names per certificate, and the account kept in a CertStore.
  • challenge: the HTTP-01 token board and listener, a TLS-ALPN-01 challenge-only listener, and DNS-01 publishers (a hook command, a manual prompt, and grindvakt-core providers with the grindvakt feature).
  • store: the CertStore trait, a file store (files 0600), a memory store, and with the storage feature a store in an encrypted weirdnet-storage database; store::import moves an app’s earlier files in.
  • resolver: a rustls SNI Resolver with per-name hot swap, source order user, ACME, self-signed, pinned certificates for internal names, and the TLS-ALPN-01 answers.
  • renew: when to renew (ACME Renewal Information, else two thirds of the lifetime), failure backoff from 1 hour to 1 day, a guard on forced renewals, a typed Status, and an offline Schedule read from the store (acme::schedule).
  • [testing] (feature testing): a mock ACME CA that validates the real challenge answers.

The crate never serves plain HTTP in place of HTTPS: when an order fails, the resolver keeps serving the previous certificate (or the self-signed one), and the HTTP-01 listener answers only challenge tokens.

Pick a crypto provider with the ring (default) or aws-lc-rs feature.

Re-exports§

pub use acme::Acme;
pub use acme::AcmeConfig;
pub use acme::ChallengeKind;
pub use acme::Directory;
pub use cert::CertInfo;
pub use cert::CertPair;
pub use challenge::DnsChallenge;
pub use challenge::DnsRecord;
pub use challenge::HookDns;
pub use challenge::Http01Board;
pub use challenge::ManualDns;
pub use renew::Outcome;
pub use renew::Schedule;
pub use renew::State;
pub use renew::Status;
pub use resolver::Resolver;
pub use resolver::Source;
pub use store::CertStore;
pub use store::FileStore;
pub use store::MemoryStore;
pub use instant_acme;
pub use rustls;

Modules§

acme
Certificates from an ACME CA.
cert
Certificates and keys: PEM pairs, what a certificate says, self-signed and challenge certs.
challenge
Publishing challenge answers: the HTTP-01 board and listener, and DNS-01 publishers.
renew
When to renew, failure backoff, and the typed status.
resolver
A rustls server certificate resolver keyed by SNI.
store
Where certificates, keys, ACME accounts and renewal state are kept.

Enums§

Error
Errors from this crate.

Constants§

ACME_TLS_ALPN
The ALPN protocol of TLS-ALPN-01 validation (RFC 8737).

Functions§

crypto_provider
The rustls crypto provider picked by the features: aws-lc-rs when on, else ring.

Type Aliases§

Result
Result with Error.