Skip to content
FutureBlitz

    Install

    Import std.net.acme

    Acme

    std.net.acme

    struct

    Public Struct Acme

    What ACME needs that isn't a request to a CA. Acme isn't made: it's only its Static Methods.

    Examples

    Local key = Key(KeyKind.ECDSA_P256, True, EcdsaP256.NewPrivateKey())
    Local answer = Acme.KeyAuthorization("a-token", key)
    Expect(answer == "a-token." + Acme.Thumbprint(key))
    Expect(Acme.Jwk(key).Path("kty")?.AsString() == "EC")

    std/net/acme.fb, line 42

    • @PanicsAtCaller Public Static Method Jwk(key: Key): Value static method #

      The JWK (RFC 7517) of key's public key, key being an ECDSA P-256 key, private or public: its curve, its type, and its point's x and y in base64url, in that order, which its thumbprint takes. Panics for a key of another kind.

    • @PanicsAtCaller Public Static Method Thumbprint(key: Key): String static method #

      key's JWK thumbprint (RFC 7638): SHA-256 of its JWK's members, in order, without spaces, in base64url.

    • @PanicsAtCaller Public Static Method KeyAuthorization(token: String, accountKey: Key): String static method #

      What an HTTP-01 challenge's response is: its token, then ".", then the account key's thumbprint.

    • @PanicsAtCaller Public Static Method CertificateRequest(key: Key, names: String[]): UInt8[] static method #

      A certificate signing request (PKCS #10) of key, an ECDSA P-256 private key, which signs it, for names, DNS names, which its subjectAltName lists, in order, where ACME's CAs read them, and whose subject's common name is the first name that fits in one, 64 bytes, as certbot's is, since some readers, mbedTLS's among them, don't take an empty subject. Panics for a key of another kind or a public one, no names, or a name that isn't a DNS name of ASCII letters, digits, and hyphens, as an IDN's A-label is, maybe with "*." first, for a wildcard, whose labels neither start nor end with a hyphen, and whose last isn't all digits, as an IPv4 address's is.

    Report an issue with this page or with FutureBlitz on GitHub.