Firebase Update
This commit is contained in:
21
express-server/node_modules/greenlock/index.js
generated
vendored
21
express-server/node_modules/greenlock/index.js
generated
vendored
@ -133,7 +133,7 @@ Greenlock.create = function (gl) {
|
||||
agreeCb(new Error("'agreeToTerms' was not supplied to Greenlock and 'agreeTos' was not supplied to Greenlock.register"));
|
||||
};
|
||||
|
||||
if (!gl.renewWithin) { gl.renewWithin = 30 * DAY; }
|
||||
if (!gl.renewWithin) { gl.renewWithin = 14 * DAY; }
|
||||
// renewBy has a default in le-sni-auto
|
||||
|
||||
|
||||
@ -142,6 +142,8 @@ Greenlock.create = function (gl) {
|
||||
// BEGIN VERSION MADNESS //
|
||||
///////////////////////////
|
||||
|
||||
gl.version = gl.version || 'draft-11';
|
||||
gl.server = gl.server || 'https://acme-v02.api.letsencrypt.org/directory';
|
||||
if (!gl.version) {
|
||||
//console.warn("Please specify version: 'v01' (Let's Encrypt v1) or 'draft-12' (Let's Encrypt v2 / ACME draft 12)");
|
||||
console.warn("");
|
||||
@ -378,7 +380,6 @@ Greenlock.create = function (gl) {
|
||||
gl.approveDomains = null;
|
||||
}
|
||||
if (!gl.approveDomains) {
|
||||
gl.approvedDomains = gl.approvedDomains || [];
|
||||
gl.approveDomains = function (lexOpts, certs, cb) {
|
||||
var err;
|
||||
var emsg;
|
||||
@ -389,13 +390,23 @@ Greenlock.create = function (gl) {
|
||||
if (!gl.agreeTos) {
|
||||
throw new Error("le-sni-auto is not properly configured. Missing agreeTos");
|
||||
}
|
||||
if (!gl.approvedDomains.length) {
|
||||
throw new Error("le-sni-auto is not properly configured. Missing approveDomains(domain, certs, callback)");
|
||||
if (!/[a-z]/i.test(lexOpts.domain)) {
|
||||
cb(new Error("le-sni-auto does not allow IP addresses in SNI"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Array.isArray(gl.approvedDomains)) {
|
||||
// The acme-v2 package uses pre-flight test challenges to
|
||||
// verify that each requested domain is hosted by the server
|
||||
// these checks are sufficient for most use cases
|
||||
return cb(null, { options: lexOpts, certs: certs });
|
||||
}
|
||||
|
||||
if (lexOpts.domains.every(function (domain) {
|
||||
return -1 !== gl.approvedDomains.indexOf(domain);
|
||||
})) {
|
||||
lexOpts.domains = gl.approvedDomains.slice(0);
|
||||
// commented this out because people expect to be able to edit the list of domains
|
||||
// lexOpts.domains = gl.approvedDomains.slice(0);
|
||||
lexOpts.email = gl.email;
|
||||
lexOpts.agreeTos = gl.agreeTos;
|
||||
lexOpts.communityMember = gl.communityMember;
|
||||
|
Reference in New Issue
Block a user