Compare commits

...

2 Commits

Author SHA1 Message Date
AJ ONeal d7ddd32f22 v2.3.1 2018-05-12 19:22:20 -06:00
AJ ONeal 09d69c521f update docs 2018-05-12 19:22:09 -06:00
2 changed files with 17 additions and 5 deletions

View File

@ -8,7 +8,7 @@ le-challenge-dns
| [acme-v2.js](https://git.coolaj86.com/coolaj86/acme-v2.js) | [acme-v2.js](https://git.coolaj86.com/coolaj86/acme-v2.js)
| |
A manual (interactive CLI) dns-based strategy for node-letsencrypt for setting, retrieving, A manual (interactive CLI) dns-based strategy for greenlock.js for setting, retrieving,
and clearing ACME DNS-01 challenges issued by the ACME server and clearing ACME DNS-01 challenges issued by the ACME server
Prints out a subdomain record for `_acme-challenge` with `keyAuthDigest` Prints out a subdomain record for `_acme-challenge` with `keyAuthDigest`
@ -31,14 +31,16 @@ npm install --save le-challenge-dns@2.x
Usage Usage
----- -----
The challenge can be set globally like this:
```bash ```bash
var leChallengeDns = require('le-challenge-dns').create({ var leChallengeDns = require('le-challenge-dns').create({
debug: false debug: false
}); });
var LE = require('letsencrypt'); var Greenlock = require('greenlock');
LE.create({ Greenlock.create({
server: LE.stagingServerUrl // Change to LE.productionServerUrl in production server: LE.stagingServerUrl // Change to LE.productionServerUrl in production
, challengeType: 'dns-01' , challengeType: 'dns-01'
, challenges: { , challenges: {
@ -48,6 +50,16 @@ LE.create({
}); });
``` ```
In can also be set in the `approveDomains` callback instead, like this:
```
function approveDomains(opts, certs, cb) {
opts.challenges = { 'dns-01': leChallengeDns };
...
cb(null, { options: opts, certs: certs });
}
```
NOTE: If you request a certificate with 6 domains listed, NOTE: If you request a certificate with 6 domains listed,
it will require 6 individual challenges. it will require 6 individual challenges.
@ -62,7 +74,7 @@ For ACME Challenge:
Note: `get()` is a no-op for `dns-01`. Note: `get()` is a no-op for `dns-01`.
For node-letsencrypt internals: For greenlock.js internals:
* `getOptions()` returns the internal defaults merged with the user-supplied options * `getOptions()` returns the internal defaults merged with the user-supplied options
* `loopback(defaults, domain, challange, done)` performs a dns lookup of the txt record * `loopback(defaults, domain, challange, done)` performs a dns lookup of the txt record

View File

@ -1,6 +1,6 @@
{ {
"name": "le-challenge-dns", "name": "le-challenge-dns",
"version": "2.3.0", "version": "2.3.1",
"description": "A manual (interactive CLI) dns-based strategy for node-letsencrypt for setting, retrieving, and clearing ACME DNS-01 challenges issued by the ACME server", "description": "A manual (interactive CLI) dns-based strategy for node-letsencrypt for setting, retrieving, and clearing ACME DNS-01 challenges issued by the ACME server",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {