2017-04-13 01:57:55 +08: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 21:23:50 +08:00
|
|
|
sslcapath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [],
|
2017-04-13 01:57:55 +08:00
|
|
|
dhparampath: getFile('/run/secrets/dhparam.pem')
|
|
|
|
}
|