Added ability to designate CA root (for small CAs)

This commit is contained in:
dabura667 2015-06-10 22:31:40 +09:00
parent 4b38588295
commit 5a5b492415
1 changed files with 6 additions and 0 deletions

6
bws.js
View File

@ -27,6 +27,12 @@ var serverOpts = {};
if (config.https) {
serverOpts.key = fs.readFileSync(config.privateKeyFile || './ssl/privatekey.pem');
serverOpts.cert = fs.readFileSync(config.certificateFile || './ssl/certificate.pem');
// This sets the intermediate CA certs only if they have all been designated in the config.js
if (config.CAinter1 && config.CAinter2 && config.CAroot) {
serverOpts.ca = [fs.readFileSync(config.CAinter1),
fs.readFileSync(config.CAinter2),
fs.readFileSync(config.CAroot)
];};
}
var start = function(cb) {