summaryrefslogtreecommitdiff
path: root/lib/config/defaultSSL.js
blob: 1f1d5590643b79fe599234ae1baffd8a6f6bf874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'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'),
  sslcapath: getFile('/run/secrets/ca.pem'),
  dhparampath: getFile('/run/secrets/dhparam.pem')
}