Merge pull request #37 from mkremers/hotfix/allowCustomCA

Allow for custom ca set on httpsOptions to be used in the createSecure…
This commit is contained in:
AJ ONeal 2016-04-15 16:49:40 -06:00
commit f884f5cc58
1 changed files with 1 additions and 0 deletions

View File

@ -102,6 +102,7 @@ module.exports.create = function (opts) {
certInfo.tlsContext = tls.createSecureContext({
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)
});
} catch(e) {
console.warn("[Sanity Check Fail]: a weird object was passed back through le.fetch to lex.fetch");