Adding support for providing intermediate CA certificates when running etherpad-lite with ssl through Node/expressjs
parent
d31523aa08
commit
ec7b3fc787
|
@ -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"]
|
||||||
},
|
},
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue