Merge pull request #2636 from andreassolberg/develop

Adding support for providing intermediate CA certificates
requirejs-noiframe^2
John McLear 2015-04-22 20:38:42 +01:00
commit d7c7c96145
2 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,7 @@
"ssl" : { "ssl" : {
"key" : "/path-to-your/epl-server.key", "key" : "/path-to-your/epl-server.key",
"cert" : "/path-to-your/epl-server.crt" "cert" : "/path-to-your/epl-server.crt"
"ca": ["/path-to-your/epl-intermediate-cert1.crt", "/path-to-your/epl-intermediate-cert2.crt"]
}, },
*/ */

View File

@ -46,6 +46,13 @@ exports.restartServer = function () {
key: fs.readFileSync( settings.ssl.key ), key: fs.readFileSync( settings.ssl.key ),
cert: fs.readFileSync( settings.ssl.cert ) cert: fs.readFileSync( settings.ssl.cert )
}; };
if (settings.ssl.ca) {
options.ca = [];
for(var i = 0; i < settings.ssl.ca.length; i++) {
var caFileName = settings.ssl.ca[i];
options.ca.push(fs.readFileSync(caFileName));
}
}
var https = require('https'); var https = require('https');
server = https.createServer(options, app); server = https.createServer(options, app);