From 772dd225162a08a8f3199762d383c771ddb89b64 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 19 Apr 2018 13:37:27 -0600 Subject: [PATCH] use better renewWithin/By defaults, document access --- README.md | 9 +++++---- index.js | 2 +- package.json | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f95711b..65cebed 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,8 @@ Now supports **Let's Encrypt v2**!! | [greenlock-cluster](https://git.coolaj86.com/coolaj86/greenlock-cluster.js) | [greenlock-koa](https://git.coolaj86.com/coolaj86/greenlock-koa.js) | [greenlock-hapi](https://git.coolaj86.com/coolaj86/greenlock-hapi.js) -<<<<<<< HEAD -| Sponsored by [ppl](https://ppl.family). Created at [Daplie](https://dapliefounder.com). -======= | Sponsored by [ppl](https://ppl.family) ->>>>>>> 84e21d2385da4e2260befd1c91ac4564e1e21301 Automatic [Let's Encrypt](https://letsencrypt.org) (ACME) HTTPS / TLS / SSL Certificates for node.js @@ -154,6 +150,11 @@ le = LE.create({ , challengeType: 'http-01' // default to this challenge type , agreeToTerms: leAgree // hook to allow user to view and accept LE TOS //, sni: require('le-sni-auto').create({}) // handles sni callback + + // renewals happen at a random time within this window +, renewWithin: 14 * 24 * 60 * 60 * 1000 // certificate renewal may begin at this time +, renewBy: 10 * 24 * 60 * 60 * 1000 // certificate renewal should happen by this time + , debug: false //, log: function (debug) {console.log.apply(console, args);} // handles debug outputs }); diff --git a/index.js b/index.js index 31d85ac..56dc3ca 100644 --- a/index.js +++ b/index.js @@ -107,7 +107,7 @@ LE.create = function (le) { agreeCb(new Error("'agreeToTerms' was not supplied to LE and 'agreeTos' was not supplied to LE.register")); }; - if (!le.renewWithin) { le.renewWithin = 7 * DAY; } + if (!le.renewWithin) { le.renewWithin = 14 * DAY; } // renewBy has a default in le-sni-auto if (!le.server) { diff --git a/package.json b/package.json index d9d1712..8792fb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenlock", - "version": "2.2.2", + "version": "2.2.3", "description": "Let's Encrypt for node.js on npm", "main": "index.js", "scripts": { @@ -64,7 +64,7 @@ "le-acme-core": "^2.1.2", "le-challenge-fs": "^2.0.2", "le-challenge-sni": "^2.0.0", - "le-sni-auto": "^2.1.0", + "le-sni-auto": "^2.1.3", "le-store-certbot": "^2.0.3", "localhost.daplie.me-certificates": "^1.3.0", "node.extend": "^1.1.5",