From e0bec09e437fa11e649ea79c8c16fa6e4f0e3be9 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 25 Oct 2019 05:20:44 -0600 Subject: [PATCH] v3.0.0: at last! --- README.md | 20 ++++++++++++++++++-- package-lock.json | 2 +- package.json | 5 +++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1deed68..42d8ecd 100644 --- a/README.md +++ b/README.md @@ -55,20 +55,36 @@ However, in keeping to our values we've made the source visible for others to in # API Overview ```js -ACME.create({ maintainerEmail, packageAgent }); +ACME.create({ maintainerEmail, packageAgent, notify }); acme.init(directoryUrl); acme.accounts.create({ subscriberEmail, agreeToTerms, accountKey }); acme.certificates.create({ customerEmail, // do not use account, accountKey, - serverKey, csr, domains, challenges }); ``` +| Parameter | Description | +| --------------- | ----------------------------------------------------------------------------------------------------------- | +| account | an object containing the Let's Encrypt Account ID as "kid" (misnomer, not actually a key id/thumbprint) | +| accountKey | an RSA or EC public/private keypair in JWK format | +| agreeToTerms | set to `true` to agree to the Let's Encrypt Subscriber Agreement | +| challenges | the 'http-01', 'alpn-01', and/or 'dns-01' challenge plugins (`get`, `set`, and `remove` callbacks) to use | +| csr | a Certificate Signing Request (CSR), which may be generated with csr.js, openssl, or another | +| customerEmail | Don't use this. Given as an example to differentiate between Maintainer, Subscriber, and End-User | +| directoryUrl | should be the Let's Encrypt Directory URL
`https://acme-staging-v02.api.letsencrypt.org/directory` | +| domains | the list of altnames (subject first) that are listed in the CSR and will be listed on the certificate | +| notify | all callback for logging events and errors in the form `function (ev, args) { ... }` | +| maintainerEmail | should be a contact for the author of the code to receive critical bug and security notices | +| packageAgent | should be an RFC72321-style user-agent string to append to the ACME client (ex: mypackage/v1.1.1) | +| subscriberEmail | should be a contact for the service provider to receive renewal failure notices and manage the ACME account | + +Helper Functions + ```js ACME.computeChallenge({ accountKey: jwk, diff --git a/package-lock.json b/package-lock.json index 00bf7af..92a851f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@root/acme", - "version": "3.0.0-wip.4", + "version": "3.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0bd083f..0cfca4f 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "@root/acme", - "version": "3.0.0-wip.4", + "version": "3.0.0", "description": "Free SSL certificates for Node.js and Browsers. Issued via Let's Encrypt", "homepage": "https://rootprojects.org/acme/", "main": "acme.js", "browser": { "./lib/native.js": "./lib/browser.js", "./lib/node/sha2.js": "./lib/browser/sha2.js", - "./lib/node/http.js": "./lib/browser/http.js" + "./lib/node/http.js": "./lib/browser/http.js", + "./lib/node/client-user-agent.js": "./lib/browser/client-user-agent.js" }, "files": [ "*.js",