From b9cd5f41afbba88bb68edd39e42070bc75baedb6 Mon Sep 17 00:00:00 2001 From: Pepijn de Vos Date: Sat, 13 Apr 2013 17:26:51 +0200 Subject: [PATCH] duck-typed CA parameter --- server/weblistener.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/weblistener.js b/server/weblistener.js index 87bb2e7..f59723b 100644 --- a/server/weblistener.js +++ b/server/weblistener.js @@ -47,8 +47,10 @@ var WebListener = function (web_config, transports) { }; // Do we have an intermediate certificate? - if (typeof web_config.ssl_ca !== 'undefined') { + if (typeof web_config.ssl_ca.map !== 'undefined') { opts.ca = web_config.ssl_ca.map(function (f) { return fs.readFileSync(f); }); + } else if (typeof web_config.ssl_ca !== 'undefined') { + opts.ca = fs.readFileSync(web_config.ssl_ca); } -- 2.25.1