add type, for greenlock

This commit is contained in:
AJ ONeal 2019-06-14 02:23:52 -06:00
parent e6497fe34b
commit 90477942d1
2 changed files with 6 additions and 3 deletions

View File

@ -471,14 +471,17 @@ ACME._getZones = function(me, options, dnsHosts) {
}; };
} }
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
var challenge = { type: 'dns-01', dnsHosts: dnsHosts };
// back/forwards-compat
challenge.challenge = challenge;
try { try {
if (options.getZones.length <= 1) { if (options.getZones.length <= 1) {
options options
.getZones({ dnsHosts: dnsHosts }) .getZones(challenge)
.then(resolve) .then(resolve)
.catch(reject); .catch(reject);
} else if (2 === options.getZones.length) { } else if (2 === options.getZones.length) {
options.getZones({ dnsHosts: dnsHosts }, function(err, zonenames) { options.getZones(challenge, function(err, zonenames) {
if (err) { if (err) {
reject(err); reject(err);
} else { } else {

View File

@ -1,6 +1,6 @@
{ {
"name": "acme-v2", "name": "acme-v2",
"version": "1.8.0", "version": "1.8.1",
"description": "A lightweight library for getting Free SSL certifications through Let's Encrypt, using the ACME protocol.", "description": "A lightweight library for getting Free SSL certifications through Let's Encrypt, using the ACME protocol.",
"homepage": "https://git.coolaj86.com/coolaj86/acme-v2.js", "homepage": "https://git.coolaj86.com/coolaj86/acme-v2.js",
"main": "node.js", "main": "node.js",