don't attach info to null cert

This commit is contained in:
AJ ONeal 2016-08-08 20:26:46 -04:00
parent c3f6bebe2b
commit 0f87922cdf
1 changed files with 11 additions and 2 deletions

View File

@ -257,17 +257,26 @@ module.exports.create = function (le) {
}); });
}); });
} }
// Certificates
, renewAsync: function (args) { , renewAsync: function (args) {
// TODO fetch email address if not present // TODO fetch email address (accountBydomain) if not present
return core.certificates.registerAsync(args); return core.certificates.registerAsync(args);
} }
// Certificates
, checkAsync: function (args) { , checkAsync: function (args) {
var copy = utils.merge(args, le); var copy = utils.merge(args, le);
utils.tplCopy(copy); utils.tplCopy(copy);
// returns pems // 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) { , getAsync: function (args) {
var copy = utils.merge(args, le); var copy = utils.merge(args, le);
args = utils.tplCopy(copy); args = utils.tplCopy(copy);