From f889ffaa9f2f1263e4bd539934efe97e27ea10c8 Mon Sep 17 00:00:00 2001 From: "Cheng-Han, Wu" Date: Tue, 15 Mar 2016 10:39:45 +0800 Subject: [PATCH] Supported ssl dhparam --- README.md | 1 + app.js | 1 + config.js | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 9d1fa90d..cff1cb62 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ Server-side config.js settings | sslkeypath | `./cert/client.key` | ssl key path | | sslcertpath | `./cert/hackmd_io.crt` | ssl cert path | | sslcapath | `['./cert/COMODORSAAddTrustCA.crt']` | ssl ca chain | +| dhparampath | `./cert/dhparam.pem` | ssl dhparam path | | tmppath | `./tmp/` | temp file path | | postgresqlstring | `postgresql://user:pass@host:port/hackmd` | PostgreSQL connection string, fallback to this when not set in environment | | mongodbstring | `mongodb://user:pass@host:port/hackmd` | MongoDB connection string, fallback to this when not set in environment | diff --git a/app.js b/app.js index 29162ecb..9ab1e82a 100644 --- a/app.js +++ b/app.js @@ -40,6 +40,7 @@ if (config.usessl) { key: fs.readFileSync(config.sslkeypath, 'utf8'), cert: fs.readFileSync(config.sslcertpath, 'utf8'), ca: ca, + dhparam: fs.readFileSync(config.dhparampath, 'utf8'), requestCert: false, rejectUnauthorized: false }; diff --git a/config.js b/config.js index 0d47c8c7..69f44a06 100644 --- a/config.js +++ b/config.js @@ -24,6 +24,7 @@ var config = { sslkeypath: 'change this', sslcertpath: 'change this', sslcapath: ['change this'], + dhparampath: 'change this', usessl: usessl, getserverurl: function() { var url = domain;