From d0e20a44cd8979938325a37cd07e06affe4205f1 Mon Sep 17 00:00:00 2001 From: tigerbot Date: Mon, 10 Apr 2017 14:21:09 -0600 Subject: [PATCH] renamed httpsOptions to tlsOptions --- README.md | 4 ++-- example/letsencrypt.js | 6 +++--- example/serve.js | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d783609..b0ff070 100644 --- a/README.md +++ b/README.md @@ -253,7 +253,7 @@ var http = require('http'); var LeCore = deps.LeCore; -var httpsOptions = deps.httpsOptions; +var tlsOptions = deps.tlsOptions; var challengeStore = deps.challengeStore; var certStore = deps.certStore; @@ -278,7 +278,7 @@ function acmeResponder(req, res) { // // Server // -https.createServer(httpsOptions, acmeResponder).listen(5001, function () { +https.createServer(tlsOptions, acmeResponder).listen(5001, function () { console.log('Listening https on', this.address()); }); http.createServer(acmeResponder).listen(80, function () { diff --git a/example/letsencrypt.js b/example/letsencrypt.js index b187808..f018658 100644 --- a/example/letsencrypt.js +++ b/example/letsencrypt.js @@ -99,7 +99,7 @@ function runDemo() { closer(); }); - + } ); } @@ -112,7 +112,7 @@ function runDemo() { closer = serve.init({ LeCore: LeCore // needs a default key and cert chain, anything will do -, httpsOptions: require('localhost.daplie.com-certificates') +, tlsOptions: require('localhost.daplie.me-certificates') , challengeStore: challengeStore -, certStore: certStore +, certStore: certStore }); diff --git a/example/serve.js b/example/serve.js index 53faec4..1c430cd 100644 --- a/example/serve.js +++ b/example/serve.js @@ -15,7 +15,7 @@ module.exports.init = function (deps) { var LeCore = deps.LeCore; - var httpsOptions = deps.httpsOptions; + var tlsOptions = deps.tlsOptions || deps.httpsOptions; var challengeStore = deps.challengeStore; var certStore = deps.certStore; @@ -63,11 +63,11 @@ module.exports.init = function (deps) { // // Server // - httpsOptions.SNICallback = certGetter; - https.createServer(httpsOptions, acmeResponder).listen(443, function () { + tlsOptions.SNICallback = certGetter; + https.createServer(tlsOptions, acmeResponder).listen(443, function () { console.log('Listening https on', this.address()); }); - https.createServer(httpsOptions, acmeResponder).listen(5001, function () { + https.createServer(tlsOptions, acmeResponder).listen(5001, function () { console.log('Listening https on', this.address()); }); http.createServer(acmeResponder).listen(80, function () { @@ -77,6 +77,6 @@ module.exports.init = function (deps) { return function () { // Note: we should just keep a handle on // the servers and close them each with server.close() - process.exit(1); + process.exit(1); }; };