From: Pepijn de Vos Date: Sat, 13 Apr 2013 14:41:29 +0000 (+0200) Subject: allow absolute paths and multiple CAs X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=562ecbe066ee2f3652c42da1321c2cf98208f435;p=KiwiIRC.git allow absolute paths and multiple CAs --- diff --git a/server/weblistener.js b/server/weblistener.js index c67939a..87bb2e7 100644 --- a/server/weblistener.js +++ b/server/weblistener.js @@ -42,13 +42,13 @@ var WebListener = function (web_config, transports) { if (web_config.ssl) { opts = { - key: fs.readFileSync(__dirname + '/' + web_config.ssl_key), - cert: fs.readFileSync(__dirname + '/' + web_config.ssl_cert) + key: fs.readFileSync(web_config.ssl_key), + cert: fs.readFileSync(web_config.ssl_cert) }; // Do we have an intermediate certificate? if (typeof web_config.ssl_ca !== 'undefined') { - opts.ca = fs.readFileSync(__dirname + '/' + web_config.ssl_ca); + opts.ca = web_config.ssl_ca.map(function (f) { return fs.readFileSync(f); }); } @@ -155,4 +155,4 @@ function newConnection(websocket) { -module.exports = WebListener; \ No newline at end of file +module.exports = WebListener;