chimney
This commit is contained in:
parent
20dd707cf4
commit
7e1701f2fd
8
index.js
8
index.js
|
@ -137,7 +137,8 @@ LE.create = function (defaults, handlers, backend) {
|
||||||
// If you do not check these things, then someone could attack you
|
// If you do not check these things, then someone could attack you
|
||||||
// and cause you, in return, to have your ip be rate-limit blocked
|
// and cause you, in return, to have your ip be rate-limit blocked
|
||||||
//
|
//
|
||||||
console.warn("[SECURITY WARNING]: node-letsencrypt: validate(hostnames, cb) NOT IMPLEMENTED");
|
console.warn("\n[TODO]: node-letsencrypt: `validate(hostnames, cb)` needs to be implemented");
|
||||||
|
console.warn("(it'll work fine without it, but for security - and convenience - it should be implemented\n");
|
||||||
cb(null, true);
|
cb(null, true);
|
||||||
}
|
}
|
||||||
, _registerHelper: function (args, cb) {
|
, _registerHelper: function (args, cb) {
|
||||||
|
@ -210,8 +211,9 @@ LE.create = function (defaults, handlers, backend) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (hit) {
|
else if (hit) {
|
||||||
if ((now - hit.issuedAt) < ((hit.lifetime || handlers.lifetime) * 0.65)) {
|
if (!args.duplicate && (now - hit.issuedAt) < ((hit.lifetime || handlers.lifetime) * 0.65)) {
|
||||||
console.warn("tried to renew a certificate with over 1/3 of its lifetime left, ignoring");
|
console.warn("\ntried to renew a certificate with over 1/3 of its lifetime left, ignoring");
|
||||||
|
console.warn("(use --duplicate or opts.duplicate to override\n");
|
||||||
cb(null, hit);
|
cb(null, hit);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ module.exports.fetchFromDisk = function (args) {
|
||||||
, lifetime: args.lifetime
|
, lifetime: args.lifetime
|
||||||
};
|
};
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
if (true || args.debug) {
|
if (args.debug) {
|
||||||
console.error(err.stack);
|
console.error(err.stack);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue