From 562ecbe066ee2f3652c42da1321c2cf98208f435 Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Sat, 13 Apr 2013 16:41:29 +0200 Subject: [PATCH] allow absolute paths and multiple CAs --- server/weblistener.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.25.1