weirdnet-tls
TLS certificates for Weirdnet hosts and apps: ACME issuance and renewal, certificate stores, and a rustls SNI resolver. It is the shared replacement for the ACME code in Mouser, Muninn, itcmdr and TAUR.
- ACME over instant-acme: an account per directory kept in the store, several names per certificate, wildcards, ACME profiles (optionally falling back to the CA's default), Let's Encrypt production or staging, or any RFC 8555 directory.
- Challenges: TLS-ALPN-01 answered by the resolver on your port 443, HTTP-01 from a token
board (serve it with
serve_http01or your own router throughHttp01Board::answer), and DNS-01 through theDnsChallengetrait: a hook command, a manual prompt, or (featuregrindvakt) a grindvakt-core DNS provider. - Stores: the
CertStoretrait,FileStore(files 0600 in directories 0700, atomic writes),MemoryStore, and (featurestorage)SqlStorein an encrypted weirdnet-storage database. - Resolver: per-name certificates swapped without a restart. A handshake gets a pinned certificate first (internal names, a private CA), then the user's own, then ACME, then self-signed, skipping expired ones. A default answers handshakes without SNI.
- Renewal: at a point in the CA's ACME Renewal Information window (RFC 9773) with
replaces, else two thirds into the lifetime; failures back off from 1 hour to 1 day; a forced renewal within a day of the last issue is refused;Acme::watchgives a typedStatus. A failed order never drops TLS: the last certificate stays in service. - Crypto:
ring(default) oraws-lc-rs. - Tests:
testing::MockCa(featuretesting) is an in-process ACME CA that validates the real HTTP-01, TLS-ALPN-01 and DNS-01 answers and serves ARI.
HTTP servers and port forwarding are out of scope.
use Arc;
use *;
# async
DNS-01 hooks get WEIRDNET_TLS_ACTION (present or cleanup), WEIRDNET_TLS_DOMAIN,
WEIRDNET_TLS_NAME and WEIRDNET_TLS_TXT. grindvakt-core providers cannot delete records,
so with GrindvaktDns the _acme-challenge TXT record is overwritten on each order and left
in place afterwards.
Platforms
Linux, macOS and Windows are tested in CI; Android (aarch64, API 26) and iOS (aarch64) build.
License
BSD-3-Clause.