1 From ba6142dbaebe06738686da150043abbd1ef1fbf5 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Tue, 8 Dec 2015 21:22:45 +0100
4 Subject: [PATCH] src: fix build error without OpenSSL support
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 PR #3890 [1] introduced the variable ALLOW_INSECURE_SERVER_DHPARAM defined
10 in src/node_crypto.cc. However, if nodejs is built without OpenSSL support,
12 error: ‘ALLOW_INSECURE_SERVER_DHPARAM’ was not declared in this scope
13 ALLOW_INSECURE_SERVER_DHPARAM = true;
15 Fix this by using the preprocessor macro HAVE_OPENSSL to opt-out the use of
16 ALLOW_INSECURE_SERVER_DHPARAM in non-OpenSSL builds.
18 Patch status: Sent upstream [2]
20 [1] https://github.com/nodejs/node/pull/3890
21 [2] https://github.com/nodejs/node/pull/4201
23 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
26 1 file changed, 2 insertions(+)
28 diff --git a/src/node.cc b/src/node.cc
29 index 1da8328..e5239ac 100644
32 @@ -3042,7 +3042,9 @@ static void ParseArgs(int* argc,
35 } else if (strcmp(arg, "--allow-insecure-server-dhparam") == 0) {
37 ALLOW_INSECURE_SERVER_DHPARAM = true;
39 } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {