From e5aa40c3d37d001995b73e42579eca2bfbb07312 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 16 Dec 2015 03:28:40 +0000 Subject: [PATCH] WORKSgit status! --- example/serve.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/serve.js b/example/serve.js index 1f75c9c..1f7f322 100644 --- a/example/serve.js +++ b/example/serve.js @@ -41,6 +41,7 @@ module.exports.init = function (deps) { // SNI Cert Handler // function certGetter(hostname, cb) { + console.log('SNICallback says hello!', hostname); certStore.get(hostname, function (err, certs) { if (!certs) { cb(null, null); @@ -50,7 +51,7 @@ module.exports.init = function (deps) { // Note: you should cache this context in memory // so that you aren't creating a new one every time var context = tls.createSecureContext({ - cert: certs.cert + cert: certs.cert.toString('ascii') + '\n' + certs.ca.toString('ascii') , key: certs.key }); @@ -69,7 +70,7 @@ module.exports.init = function (deps) { https.createServer(httpsOptions, acmeResponder).listen(5001, function () { console.log('Listening https on', this.address()); }); - http.createServer().listen(80, function () { + http.createServer(acmeResponder).listen(80, function () { console.log('Listening http on', this.address()); }); };