From 20f006b1a0c9ab9d2d3dc2d46abf0a57c5f8b761 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 14 Jun 2019 02:23:52 -0600 Subject: [PATCH] add type, for greenlock --- node.js | 7 +++++-- package.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/node.js b/node.js index 1d4c045..5c31b9f 100644 --- a/node.js +++ b/node.js @@ -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 { diff --git a/package.json b/package.json index 1ec026e..9601dfb 100644 --- a/package.json +++ b/package.json @@ -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",