From 53321d219a7884be443b375b28377ced3e5a0f95 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 11 May 2018 20:29:21 -0600 Subject: [PATCH 01/11] show store and challenges --- README.md | 6 ++++++ lex.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9743058..083feff 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,8 @@ var lex = require('greenlock-express').create({ // Join the community to get notified of important updates and help me make greenlock better , communityMember: true + +, store: require('le-store-certbot').create({ webrootPath: '/tmp/acme-challenges' }) }); ``` @@ -268,12 +270,16 @@ The Automatic Certificate Issuance is initiated via SNI (`httpsOptions.SNICallba For security, domain validation MUST have an approval callback in *production*. ```javascript +var http01 = require('le-challenge-fs').create({ webrootPath: '/tmp/acme-challenges' }); function approveDomains(opts, certs, cb) { // This is where you check your database and associated // email addresses with domains and agreements and such + // Opt-in to submit stats and get important updates opts.communityMember = true; + opts.challenges = { 'http-01': http01 }; + // The domains being approved for the first time are listed in opts.domains // Certs being renewed are listed in certs.altnames if (certs) { diff --git a/lex.js b/lex.js index 751e2dc..d3211e9 100644 --- a/lex.js +++ b/lex.js @@ -68,7 +68,7 @@ module.exports.create = function (opts) { ports.forEach(function (p) { if (!(parseInt(p, 10) >= 0)) { console.warn("'" + p + "' doesn't seem to be a valid port number for https"); } promises.push(new PromiseA(function (resolve) { - var server = require('https').createServer(le.httpsOptions, le.middleware(le.app)).listen(p, function () { + var server = require('https').createServer(le.tlsOptions, le.middleware(le.app)).listen(p, function () { console.log("Success! Serving https on port '" + p + "'"); resolve(); }).on('error', function (e) { From d61955e6b69ca0103eccb6d20e795853a01dc5a1 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 11 May 2018 20:33:22 -0600 Subject: [PATCH 02/11] fix note on plugins --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 083feff..5d2b488 100644 --- a/README.md +++ b/README.md @@ -248,9 +248,7 @@ var lex = require('greenlock-express').create({ server: 'https://acme-staging-v02.api.letsencrypt.org/directory' , version: 'draft-11' // Let's Encrypt v2 (ACME v2) -// If you wish to replace the default plugins, you may do so here -// -, challenges: { 'http-01': require('le-challenge-fs').create({ webrootPath: '/tmp/acme-challenges' }) } + // If you wish to replace the default account and domain key storage plugin , store: require('le-store-certbot').create({ webrootPath: '/tmp/acme-challenges' }) // You probably wouldn't need to replace the default sni handler @@ -262,7 +260,6 @@ var lex = require('greenlock-express').create({ // Join the community to get notified of important updates and help me make greenlock better , communityMember: true -, store: require('le-store-certbot').create({ webrootPath: '/tmp/acme-challenges' }) }); ``` @@ -278,6 +275,7 @@ function approveDomains(opts, certs, cb) { // Opt-in to submit stats and get important updates opts.communityMember = true; + // If you wish to replace the default challenge plugin, you may do so here opts.challenges = { 'http-01': http01 }; // The domains being approved for the first time are listed in opts.domains From 2dab010be3a6fead5e40b6facac1d05b9c4ccf44 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 11 May 2018 20:51:22 -0600 Subject: [PATCH 03/11] plugin cleanup --- README.md | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 5d2b488..468c807 100644 --- a/README.md +++ b/README.md @@ -179,10 +179,10 @@ HTTP-01 Challenges | | Plugin | |:--------------:|:---------:| -| **Default (fs)** | [le-challenge-fs](https://git.coolaj86.com/coolaj86/le-challenge-fs.js.git) | +| **Default (fs)** | [le-challenge-fs](https://git.coolaj86.com/coolaj86/le-challenge-fs.js) | | AWS S3 | [llun/le-challenge-s3](https://github.com/llun/le-challenge-s3) | | Azure | [kolarcz/node-le-challenge-azure-storage](https://github.com/kolarcz/node-le-challenge-azure-storage) | -| - | Build Your Own
[le-challenge-http-SPEC](https://git.coolaj86.com/coolaj86/le-challenge-manual.js.git) | +| - | Build Your Own
[le-challenge-http-SPEC](https://git.coolaj86.com/coolaj86/le-challenge-manual.js) | | Full List | Search [le-challenge-](https://www.npmjs.com/search?q=le-challenge-) on npm | @@ -191,30 +191,40 @@ DNS-01 Challenges | | Plugin | |:--------------:|:---------:| -| **Manual (cli)** | [le-challenge-dns](https://git.coolaj86.com/coolaj86/le-challenge-dns.js.git) | +| **Manual (cli)** | [le-challenge-dns](https://git.coolaj86.com/coolaj86/le-challenge-dns.js) | | AWS Route 53 | [thadeetrompetter/le-challenge-route53](https://github.com/thadeetrompetter/le-challenge-route53) | | CloudFlare | [buschtoens/le-challenge-cloudflare](https://github.com/buschtoens/le-challenge-cloudflare) | | CloudFlare | [llun/le-challenge-cloudflare](https://github.com/llun/le-challenge-cloudflare) | | Digital Ocean | [bmv437/le-challenge-digitalocean](https://github.com/bmv437/le-challenge-digitalocean) | | etcd | [ceecko/le-challenge-etcd](https://github.com/ceecko/le-challenge-etcd) | -| - | Build Your Own
[le-challenge-dns-SPEC](https://git.coolaj86.com/coolaj86/le-challenge-dns.js.git) | +| - | Build Your Own
[le-challenge-dns-SPEC](https://git.coolaj86.com/coolaj86/le-challenge-dns.js) | | Full List | Search [le-challenge-](https://www.npmjs.com/search?q=le-challenge-) on npm | Account & Certificate Storage ----------- -| | Plugin | +| | Plugin | |:--------------:|:---------:| -| **Defaults (fs)** | [le-store-certbot](https://git.coolaj86.com/coolaj86/le-store-certbot.js.git) | +| **Default (fs)** | [le-store-certbot](https://git.coolaj86.com/coolaj86/le-store-certbot.js) | | AWS S3 | [paco3346/le-store-awss3](https://github.com/paco3346/le-store-awss3) | | AWS S3 | [llun/le-store-s3](https://github.com/llun/le-store-s3) | | Consul | [sebastian-software/le-store-consul](https://github.com/sebastian-software/le-store-consul) | | json (fs) | [paulgrove/le-store-simple-fs](https://github.com/paulgrove/le-store-simple-fs) | Redis | [digitalbazaar/le-store-redis](https://github.com/digitalbazaar/le-store-redis) | -| - | Build Your Own
[le-store-SPEC](https://git.coolaj86.com/coolaj86/le-store-SPEC.js.git) | +| - | Build Your Own
[le-store-SPEC](https://git.coolaj86.com/coolaj86/le-store-SPEC.js) | | Full List | Search [le-store-](https://www.npmjs.com/search?q=le-store-) on npm | -Bugs: Please report bugs with the community plugins to the appropriate owner first, then here if you don't get a response. +Auto-SNI +-------- + +| | Plugin | +|:-----------:|:---------:| +| **Default** | [le-store-certbot](https://git.coolaj86.com/coolaj86/le-sni-auto.js) | + +(you probably wouldn't need or want to replace this) + + +**Bugs**: Please report bugs with the community plugins to the appropriate owner first, then here if you don't get a response. Usage ===== @@ -249,17 +259,12 @@ var lex = require('greenlock-express').create({ , version: 'draft-11' // Let's Encrypt v2 (ACME v2) // If you wish to replace the default account and domain key storage plugin -, store: require('le-store-certbot').create({ webrootPath: '/tmp/acme-challenges' }) - -// You probably wouldn't need to replace the default sni handler -// See https://git.coolaj86.com/coolaj86/le-sni-auto if you think you do -//, sni: require('le-sni-auto').create({}) +, store: require('le-store-certbot').create({ + configDir: require('path').join(require('os').homedir(), 'acme', 'etc') + , webrootPath: '/tmp/acme-challenges' + }) , approveDomains: approveDomains - - // Join the community to get notified of important updates and help me make greenlock better -, communityMember: true - }); ``` From a20f91661f488ef61da20934f59090d223f55fe2 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 12 May 2018 07:46:56 +0000 Subject: [PATCH 04/11] testing with logo --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 468c807..6ba1862 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +!["Greenlock Logo"](https://git.coolaj86.com/coolaj86/greenlock.js/raw/branch/master/greenlock-850x200.png) + Greenlock™ for Express.js ================= From 8d89454c0acc768fb2332de34123ba658040ed42 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 12 May 2018 08:02:19 +0000 Subject: [PATCH 05/11] update logo size for gitea --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ba1862..828ee73 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -!["Greenlock Logo"](https://git.coolaj86.com/coolaj86/greenlock.js/raw/branch/master/greenlock-850x200.png) +!["Greenlock Logo"](https://git.coolaj86.com/coolaj86/greenlock.js/raw/branch/master/greenlock-1063x250.png) Greenlock™ for Express.js ================= From 238e262f95cd587b5aa7aa4fd21affc7701199b8 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 12 May 2018 08:03:04 +0000 Subject: [PATCH 06/11] fix logo url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 828ee73..f1b1481 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -!["Greenlock Logo"](https://git.coolaj86.com/coolaj86/greenlock.js/raw/branch/master/greenlock-1063x250.png) +!["Greenlock Logo"](https://git.coolaj86.com/coolaj86/greenlock.js/raw/branch/master/logo/greenlock-1063x250.png) Greenlock™ for Express.js ================= From 32e57aa9cbbb30ba5bed3711af7884c387eda898 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 12 May 2018 16:10:54 +0000 Subject: [PATCH 07/11] update image title and alt text --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f1b1481..5b46817 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -!["Greenlock Logo"](https://git.coolaj86.com/coolaj86/greenlock.js/raw/branch/master/logo/greenlock-1063x250.png) +![Greenlock Logo](https://git.coolaj86.com/coolaj86/greenlock.js/raw/branch/master/logo/greenlock-1063x250.png "Greenlock Logo") Greenlock™ for Express.js ================= From 44983420056bc7cb436ba3c38d41d71d4c646755 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 14 May 2018 23:35:42 +0000 Subject: [PATCH 08/11] Add download count --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5b46817..f681dcb 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ Greenlock™ for Express.js An easy-to-use ACME client for Free SSL and Automated HTTPS. +!["Lifetime Downloads"](https://img.shields.io/npm/dt/greenlock.svg "Lifetime Download Count (can't be shown)") +!["Monthly Downloads"](https://img.shields.io/npm/dm/greenlock.svg "Monthly Download Count (can't be shown)") +!["Weekly Downloads"](https://img.shields.io/npm/dw/greenlock.svg "Weekly Download Count (can't be shown)") + | Sponsored by [ppl](https://ppl.family) | [Greenlock™](https://git.coolaj86.com/coolaj86/greenlock.js) for [cli](https://git.coolaj86.com/coolaj86/greenlock-cli.js), From 462f0bfc2c140ac9823946216c0f3b8e9194b89c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 14 May 2018 23:36:12 +0000 Subject: [PATCH 09/11] fix download count display --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f681dcb..891157a 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ Greenlock™ for Express.js An easy-to-use ACME client for Free SSL and Automated HTTPS. -!["Lifetime Downloads"](https://img.shields.io/npm/dt/greenlock.svg "Lifetime Download Count (can't be shown)") -!["Monthly Downloads"](https://img.shields.io/npm/dm/greenlock.svg "Monthly Download Count (can't be shown)") -!["Weekly Downloads"](https://img.shields.io/npm/dw/greenlock.svg "Weekly Download Count (can't be shown)") +!["Lifetime Downloads"](https://img.shields.io/npm/dt/greenlock.svg "Lifetime Download Count can't be shown") +!["Monthly Downloads"](https://img.shields.io/npm/dm/greenlock.svg "Monthly Download Count can't be shown") +!["Weekly Downloads"](https://img.shields.io/npm/dw/greenlock.svg "Weekly Download Count can't be shown") | Sponsored by [ppl](https://ppl.family) | [Greenlock™](https://git.coolaj86.com/coolaj86/greenlock.js) for From a36cdd83c5c638dd0c42f035cb457ca2d425bc7b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 14 May 2018 23:39:59 +0000 Subject: [PATCH 10/11] update style --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 891157a..acc2ef8 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,17 @@ Greenlock™ for Express.js ================= -An easy-to-use ACME client for Free SSL and Automated HTTPS. +Easy-to-use ACME client for Free SSL and Automated HTTPS. !["Lifetime Downloads"](https://img.shields.io/npm/dt/greenlock.svg "Lifetime Download Count can't be shown") !["Monthly Downloads"](https://img.shields.io/npm/dm/greenlock.svg "Monthly Download Count can't be shown") !["Weekly Downloads"](https://img.shields.io/npm/dw/greenlock.svg "Weekly Download Count can't be shown") | Sponsored by [ppl](https://ppl.family) | -[Greenlock™](https://git.coolaj86.com/coolaj86/greenlock.js) for -[cli](https://git.coolaj86.com/coolaj86/greenlock-cli.js), -[cluster](https://git.coolaj86.com/coolaj86/greenlock-cluster.js), -**Express.js**, -[Koa](https://git.coolaj86.com/coolaj86/greenlock-koa.js), -[hapi](https://git.coolaj86.com/coolaj86/greenlock-hapi.js) +[Greenlock™](https://git.coolaj86.com/coolaj86/greenlock.js) is for +[Web Servers](https://git.coolaj86.com/coolaj86/greenlock-cli.js), +[Web Browsers](https://git.coolaj86.com/coolaj86/greenlock.html), +and **node.js middleware systems**. Features ======== From ff58ff6eb609ea0df262e88c322985f13db515b9 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 14 May 2018 23:42:54 +0000 Subject: [PATCH 11/11] change slogan --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index acc2ef8..f908811 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Greenlock™ for Express.js ================= - -Easy-to-use ACME client for Free SSL and Automated HTTPS. +Free SSL, Free Wildcard SSL, and Fully Automated HTTPS made dead simple
+certificates issued by Let's Encrypt v2 via [ACME](https://git.coolaj86.com/coolaj86/acme-v2.js) !["Lifetime Downloads"](https://img.shields.io/npm/dt/greenlock.svg "Lifetime Download Count can't be shown") !["Monthly Downloads"](https://img.shields.io/npm/dm/greenlock.svg "Monthly Download Count can't be shown")