add le-sni-auto

This commit is contained in:
AJ ONeal 2016-08-12 15:24:28 -06:00
parent 86bae2739c
commit ac972b2c3b
2 changed files with 16 additions and 1 deletions

View File

@ -59,7 +59,7 @@ LE.create = function (le) {
le.store = le.store || require('le-store-certbot').create({ debug: le.debug }); le.store = le.store || require('le-store-certbot').create({ debug: le.debug });
le.challenge = le.challenge || require('le-challenge-fs').create({ debug: le.debug }); le.challenge = le.challenge || require('le-challenge-fs').create({ debug: le.debug });
le.core = require('./lib/core'); le.core = require('./lib/core');
// le.sni = require('le-sni-auto'); le.sni = le.sni || require('le-sni-auto');
le = LE._undefine(le); le = LE._undefine(le);
le.acmeChallengePrefix = LE.acmeChallengePrefix; le.acmeChallengePrefix = LE.acmeChallengePrefix;
@ -115,6 +115,20 @@ LE.create = function (le) {
le[key] = le._challengeOpts[key]; le[key] = le._challengeOpts[key];
} }
}); });
if (le.sni.create) {
le.sni = le.sni.create(le);
}
/*
le.sni = PromiseA.promisifyAll(le.sni);
le._sniOpts = le.sni.getOptions();
Object.keys(le._sniOpts).forEach(function (key) {
if (!(key in le)) {
le[key] = le._sniOpts[key];
}
});
*/
// TODO wrap these here and now with tplCopy? // TODO wrap these here and now with tplCopy?
if (5 !== le.challenge.set.length) { if (5 !== le.challenge.set.length) {
throw new Error("le.challenge.set receives the wrong number of arguments." throw new Error("le.challenge.set receives the wrong number of arguments."

View File

@ -38,6 +38,7 @@
"homedir": "^0.6.0", "homedir": "^0.6.0",
"le-acme-core": "^2.0.5", "le-acme-core": "^2.0.5",
"le-challenge-fs": "^2.0.2", "le-challenge-fs": "^2.0.2",
"le-sni-auto": "^2.0.1",
"le-store-certbot": "^2.0.3", "le-store-certbot": "^2.0.3",
"node.extend": "^1.1.5", "node.extend": "^1.1.5",
"pkijs": "^1.3.27", "pkijs": "^1.3.27",