From 082f0e45224cbd32fca0134a505ab1116b31dc32 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 4 Apr 2019 22:18:07 -0600 Subject: [PATCH] v2.7.8: burn some logs, ensure account and certificate objects --- index.js | 8 +++++++- package-lock.json | 8 ++++---- package.json | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index bbf2bc6..757fffe 100644 --- a/index.js +++ b/index.js @@ -426,13 +426,19 @@ Greenlock.create = function (gl) { gl.getCertificates = function (domain, certs, cb) { // certs come from current in-memory cache, not lookup log(gl.debug, 'gl.getCertificates called for', domain, 'with certs for', certs && certs.altnames || 'NONE'); - var opts = { domain: domain, domains: certs && certs.altnames || [ domain ], certs: certs }; + var opts = { + domain: domain, domains: certs && certs.altnames || [ domain ] + , certs: certs, certificate: {}, account: {} + }; function cb2(results) { log(gl.debug, 'gl.approveDomains called with certs for', results.certs && results.certs.altnames || 'NONE', 'and options:'); log(gl.debug, results.options); var options = results.options || results; + // just in case we get a completely different object from the one we originally created + if (!options.account) { options.account = {}; } + if (!options.certificate) { options.certificate = {}; } if (results.certs) { log(gl.debug, 'gl renewing'); return gl.core.certificates.renewAsync(options, results.certs).then( diff --git a/package-lock.json b/package-lock.json index 384b500..6383f28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "greenlock", - "version": "2.7.6", + "version": "2.7.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -74,9 +74,9 @@ } }, "le-store-fs": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/le-store-fs/-/le-store-fs-1.0.1.tgz", - "integrity": "sha512-5/Q4mfPGXlmki3ccPar796oNkZ21bJCY/AAHmqjKlHBUF2Ck1hlnaADP/2nQFK4UNzPACVAgvZSv/f1rZYvwdA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/le-store-fs/-/le-store-fs-1.0.2.tgz", + "integrity": "sha512-9Xm9Lro0qCJMSdsR2496lqu+VjjRUC0Rz3BYGpgVbWb+9+4wyLk+Gq76q3nI3UzrpDxcqhR+Jh1FDxsRowKmmg==", "requires": { "mkdirp": "^0.5.1", "safe-replace": "^1.1.0" diff --git a/package.json b/package.json index a28563a..ac4bfb7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenlock", - "version": "2.7.7", + "version": "2.7.8", "description": "Let's Encrypt for node.js on npm", "main": "index.js", "files": [ @@ -46,7 +46,7 @@ "le-challenge-fs": "^2.0.2", "le-sni-auto": "^2.1.8", "le-store-certbot": "^2.2.1", - "le-store-fs": "^1.0.1", + "le-store-fs": "^1.0.2", "rsa-compat": "^2.0.6" }, "engines": {