diff options
author | LaysDragon | 2017-11-28 21:23:50 +0800 |
---|---|---|
committer | LaysDragon | 2017-12-05 12:06:10 +0800 |
commit | 9949795533d2a83d7c63367a1297b7b2626d1e7e (patch) | |
tree | 010e70de1285802b2854661b5520ba5608623988 | |
parent | 8112cd6fef740c3bf8f535de860c2e7b8dd51834 (diff) |
fixed sslcapath bug
Diffstat (limited to '')
-rw-r--r-- | lib/config/defaultSSL.js | 2 | ||||
-rw-r--r-- | lib/config/index.js | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/config/defaultSSL.js b/lib/config/defaultSSL.js index 1f1d5590..362c62a1 100644 --- a/lib/config/defaultSSL.js +++ b/lib/config/defaultSSL.js @@ -12,6 +12,6 @@ function getFile (path) { module.exports = { sslkeypath: getFile('/run/secrets/key.pem'), sslcertpath: getFile('/run/secrets/cert.pem'), - sslcapath: getFile('/run/secrets/ca.pem'), + sslcapath: getFile('/run/secrets/ca.pem') !== undefined ? [getFile('/run/secrets/ca.pem')] : [], dhparampath: getFile('/run/secrets/dhparam.pem') } diff --git a/lib/config/index.js b/lib/config/index.js index addd8ba6..6ed652ad 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -95,7 +95,15 @@ config.isLDAPEnable = config.ldap.url config.isPDFExportEnable = config.allowpdfexport // generate correct path -config.sslcapath = path.join(appRootPath, config.sslcapath) +config.sslcapath = (function () { + var i, len, results + results = [] + for (i = 0, len = config.sslcapath.length; i < len; i++) { + results.push(path.resolve(appRootPath, config.sslcapath[i])) + } + return results +})() + config.sslcertpath = path.join(appRootPath, config.sslcertpath) config.sslkeypath = path.join(appRootPath, config.sslkeypath) config.dhparampath = path.join(appRootPath, config.dhparampath) |