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); });
}
-module.exports = WebListener;
\ No newline at end of file
+module.exports = WebListener;