forked from root/acme.js
v3.0.0: at last!
This commit is contained in:
parent
148846b18a
commit
e0bec09e43
20
README.md
20
README.md
|
@ -55,20 +55,36 @@ However, in keeping to our values we've made the source visible for others to in
|
||||||
# API Overview
|
# API Overview
|
||||||
|
|
||||||
```js
|
```js
|
||||||
ACME.create({ maintainerEmail, packageAgent });
|
ACME.create({ maintainerEmail, packageAgent, notify });
|
||||||
acme.init(directoryUrl);
|
acme.init(directoryUrl);
|
||||||
acme.accounts.create({ subscriberEmail, agreeToTerms, accountKey });
|
acme.accounts.create({ subscriberEmail, agreeToTerms, accountKey });
|
||||||
acme.certificates.create({
|
acme.certificates.create({
|
||||||
customerEmail, // do not use
|
customerEmail, // do not use
|
||||||
account,
|
account,
|
||||||
accountKey,
|
accountKey,
|
||||||
serverKey,
|
|
||||||
csr,
|
csr,
|
||||||
domains,
|
domains,
|
||||||
challenges
|
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<br>`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
|
```js
|
||||||
ACME.computeChallenge({
|
ACME.computeChallenge({
|
||||||
accountKey: jwk,
|
accountKey: jwk,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@root/acme",
|
"name": "@root/acme",
|
||||||
"version": "3.0.0-wip.4",
|
"version": "3.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
"name": "@root/acme",
|
"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",
|
"description": "Free SSL certificates for Node.js and Browsers. Issued via Let's Encrypt",
|
||||||
"homepage": "https://rootprojects.org/acme/",
|
"homepage": "https://rootprojects.org/acme/",
|
||||||
"main": "acme.js",
|
"main": "acme.js",
|
||||||
"browser": {
|
"browser": {
|
||||||
"./lib/native.js": "./lib/browser.js",
|
"./lib/native.js": "./lib/browser.js",
|
||||||
"./lib/node/sha2.js": "./lib/browser/sha2.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": [
|
"files": [
|
||||||
"*.js",
|
"*.js",
|
||||||
|
|
Loading…
Reference in New Issue