add type, for greenlock

This commit is contained in:
AJ ONeal 2019-06-14 02:23:52 -06:00
parent fced146928
commit 20f006b1a0
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) {
var challenge = { type: 'dns-01', dnsHosts: dnsHosts };
// back/forwards-compat
challenge.challenge = challenge;
try {
if (options.getZones.length <= 1) {
options
.getZones({ dnsHosts: dnsHosts })
.getZones(challenge)
.then(resolve)
.catch(reject);
} else if (2 === options.getZones.length) {
options.getZones({ dnsHosts: dnsHosts }, function(err, zonenames) {
options.getZones(challenge, function(err, zonenames) {
if (err) {
reject(err);
} else {

View File

@ -1,6 +1,6 @@
{
"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.",
"homepage": "https://git.coolaj86.com/coolaj86/acme-v2.js",
"main": "node.js",