From 0f87922cdfc1c2b7d8df45605b4b834a5a183904 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 8 Aug 2016 20:26:46 -0400 Subject: [PATCH] don't attach info to null cert --- lib/core.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/core.js b/lib/core.js index 89ed823..4c5aea0 100644 --- a/lib/core.js +++ b/lib/core.js @@ -257,17 +257,26 @@ module.exports.create = function (le) { }); }); } + // Certificates , renewAsync: function (args) { - // TODO fetch email address if not present + // TODO fetch email address (accountBydomain) if not present return core.certificates.registerAsync(args); } + // Certificates , checkAsync: function (args) { var copy = utils.merge(args, le); utils.tplCopy(copy); // returns pems - return le.store.certificates.checkAsync(copy).then(utils.attachCertInfo); + return le.store.certificates.checkAsync(copy).then(function (cert) { + if (cert) { + return utils.attachCertInfo(cert); + } + + return null; + }); } + // Certificates , getAsync: function (args) { var copy = utils.merge(args, le); args = utils.tplCopy(copy);