2020-04-12 08:23:17 -04:00
|
|
|
import fs from 'fs'
|
2017-04-12 13:57:55 -04:00
|
|
|
|
2020-04-12 11:45:50 -04:00
|
|
|
function getFile (path): string {
|
2017-04-12 13:57:55 -04:00
|
|
|
if (fs.existsSync(path)) {
|
|
|
|
return path
|
|
|
|
}
|
2020-04-12 11:45:50 -04:00
|
|
|
return ''
|
2017-04-12 13:57:55 -04:00
|
|
|
}
|
|
|
|
|
2020-04-12 08:23:17 -04:00
|
|
|
export const defaultSSL = {
|
2018-03-26 14:15:25 -04: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 13:57:55 -04:00
|
|
|
}
|