From d27452bb58af24ec7f9dce7f64ff2b180eec1592 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 16 Apr 2016 09:20:24 -0600 Subject: [PATCH] add crl option --- lib/sni-callback.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/sni-callback.js b/lib/sni-callback.js index fa78034..1afef6f 100644 --- a/lib/sni-callback.js +++ b/lib/sni-callback.js @@ -25,7 +25,7 @@ module.exports.create = function (opts) { return v; },' ')); } - + if (!opts.letsencrypt) { throw new Error("requires opts.letsencrypt to be a letsencrypt instance"); } if (!opts.lifetime) { opts.lifetime = 90 * 24 * 60 * 60 * 1000; } @@ -103,6 +103,7 @@ module.exports.create = function (opts) { key: certInfo.privkey || certInfo.key // privkey.pem , cert: certInfo.fullchain || certInfo.cert // fullchain.pem (cert.pem + '\n' + chain.pem) , ca: (opts.httpsOptions.ca ? opts.httpsOptions.ca + '\n' + certInfo.ca : certInfo.ca) + , crl: opts.httpsOptions.crl }); } catch(e) { console.warn("[Sanity Check Fail]: a weird object was passed back through le.fetch to lex.fetch"); @@ -127,7 +128,7 @@ module.exports.create = function (opts) { if (opts.debug) { console.debug("[LEX] '" + hostname + "' is not registered, requesting approval"); } - + if (!hostname) { sniCb(new Error('[registerCert] no hostname')); return; @@ -167,7 +168,7 @@ module.exports.create = function (opts) { sniCb(new Error('[sniCallback] [fetch] no hostname')); return; } - + opts.letsencrypt.fetch({ domains: [hostname] }, function (err, certInfo) { if (opts.debug) { console.debug("[LEX] fetch from disk result '" + hostname + "':");