acme MUST give issue(o), which, given an ACME directory's URL, the names, a DnsProvider and optionally an account key, contacts, a wait for propagation and a fetch, gets a certificate: it reads the directory, gets the account (FR-010), places an order for the names, and for each authorization that is pending sets a TXT record at _acme-challenge.<name> (a wildcard's at its base name) whose value is the base64url SHA-256 of the key authorization (token.thumbprint, the thumbprint of RFC 7638); once every record is set it calls the wait for each, answers each dns-01 challenge, polls each authorization until it is valid, sends the certificate signing request of FR-013 to the order's finalize, polls the order until it is valid, and downloads the certificate as application/pem-certificate-chain. Polling MUST wait the server's Retry-After where it gives one, else a wait that grows, within a total time. The result MUST be the certificate chain as PEM, the certificate's private key as PKCS #8 PEM, the account's private key as a JWK (to keep for the next run) and the certificate's notAfter. The module MUST name Let's Encrypt's production and staging directories (LETS_ENCRYPT, LETS_ENCRYPT_STAGING).
Enforced (check): .github: cd commons/net && bun test suite/ — acme.test.ts: a name and its wildcard issued by a fake CA, the TXT values computed from its tokens and the account key
Proved by: net/suite/acme.test.ts
Written in: net/src/acme.ts
Tests: passed: suite/acme.test.ts a certificate for a name and its wildcard: TXT records of the key authorizations, answered; passed: suite/acme.test.ts the directories of Let's Encrypt are named
Cited by: ACME certificates by DNS-01