2017-04-12 17:57:55 +00:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const fs = require('fs')
|
|
|
|
|
|
|
|
function getFile (path) {
|
|
|
|
if (fs.existsSync(path)) {
|
|
|
|
return path
|
|
|
|
}
|
|
|
|
return undefined
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
2018-03-26 18:15:25 +00:00
|
|
|
sslKeyPath: getFile('/run/secrets/key.pem'),
|
|
|
|
sslCertPath: getFile('/run/secrets/cert.pem'),
|
|
|
|
sslCAPath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [],
|
|
|
|
dhParamPath: getFile('/run/secrets/dhparam.pem')
|
2017-04-12 17:57:55 +00:00
|
|
|
}
|