2
0
mirror of https://github.com/therootcompany/greenlock.js.git synced 2025-03-05 00:00:51 +00:00

Change to address integration with greenlock-cli.

The integration was broken by 51739625176ff24fd09afc49e94eb4edb1327490,
primarily because the required property was incorrectly underscore-prefixed.
This fix restores it, unprefixed.
This commit is contained in:
Ben Schmidt 2017-08-25 16:48:24 +10:00
parent d985dd371a
commit dace8aea1f

View File

@ -382,7 +382,6 @@ module.exports.create = function (le) {
// Certificates
, getAsync: function (args) {
var copy = utils.merge(args, le);
var renewing;
args = utils.tplCopy(copy);
return core.certificates.checkAsync(args).then(function (certs) {
@ -393,13 +392,14 @@ module.exports.create = function (le) {
if (core.certificates._isRenewable(args, certs)) {
// it's time to renew the available cert
renewing = core.certificates.renewAsync(args, certs);
certs.renewing = core.certificates.renewAsync(args, certs);
if (args.waitForRenewal) {
return renewing;
return certs.renewing;
}
}
// return existing unexpired (although potentially stale) certificates when available
// there will be an additional .renewing property if the certs are being asynchronously renewed
return certs;
}).then(function (results) {
// returns pems