From 60f9968177e859d8f42db49600806c5ace435e8d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 17 Dec 2015 05:48:58 +0000 Subject: [PATCH] remove express parts --- index.js | 42 --------------------------------- lib/{account.js => accounts.js} | 0 2 files changed, 42 deletions(-) rename lib/{account.js => accounts.js} (100%) diff --git a/index.js b/index.js index c3dac44..fd678b4 100644 --- a/index.js +++ b/index.js @@ -117,46 +117,6 @@ LE.create = function (defaults, handlers, backend) { // TODO check certs with setInterval? //options.cacheContextsFor = options.cacheContextsFor || (1 * 60 * 60 * 1000); - function sniCallback(hostname, cb) { - var args = LE.merge(defaults, {}); - args.domains = [hostname]; - - le.fetch(args, function (err, cache) { - if (err) { - cb(err); - return; - } - - // vazhdo is Albanian for 'continue' - function vazhdo(err, c2) { - if (err) { - cb(err); - return; - } - - cache = c2 || cache; - - if (!cache.context) { - cache.context = tls.createSecureContext({ - key: cache.key // privkey.pem - , cert: cache.cert // fullchain.pem - //, ciphers // node's defaults are great - }); - } - - cb(null, cache.context); - } - - if (cache) { - vazhdo(); - return; - } - - var args = LE.merge(defaults, { domains: [hostname] }); - handlers.sniRegisterCallback(args, cache, vazhdo); - }); - } - le = { backend: backend , validate: function (hostnames, cb) { @@ -214,8 +174,6 @@ LE.create = function (defaults, handlers, backend) { } }; } - , SNICallback: sniCallback - , sniCallback: sniCallback , _registerHelper: function (args, cb) { var copy = LE.merge(defaults, args); var err; diff --git a/lib/account.js b/lib/accounts.js similarity index 100% rename from lib/account.js rename to lib/accounts.js