mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Adding support for providing intermediate CA certificates when running etherpad-lite with ssl through Node/expressjs
This commit is contained in:
parent
d31523aa08
commit
ec7b3fc787
2 changed files with 8 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
"ssl" : {
|
||||
"key" : "/path-to-your/epl-server.key",
|
||||
"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 ),
|
||||
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');
|
||||
server = https.createServer(options, app);
|
||||
|
|
Loading…
Reference in a new issue