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 = {
|
|
|
|
sslkeypath: getFile('/run/secrets/key.pem'),
|
|
|
|
sslcertpath: getFile('/run/secrets/cert.pem'),
|
2017-11-28 13:23:50 +00:00
|
|
|
sslcapath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [],
|
2017-04-12 17:57:55 +00:00
|
|
|
dhparampath: getFile('/run/secrets/dhparam.pem')
|
|
|
|
}
|