From 801f6ad8a36c010b6f84f8b044ccc339f3965ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Krause?= Date: Tue, 8 Dec 2015 21:22:45 +0100 Subject: [PATCH] src: fix build error without OpenSSL support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #3890 [1] introduced the variable ALLOW_INSECURE_SERVER_DHPARAM defined in src/node_crypto.cc. However, if nodejs is built without OpenSSL support, the build fails: error: ‘ALLOW_INSECURE_SERVER_DHPARAM’ was not declared in this scope ALLOW_INSECURE_SERVER_DHPARAM = true; Fix this by using the preprocessor macro HAVE_OPENSSL to opt-out the use of ALLOW_INSECURE_SERVER_DHPARAM in non-OpenSSL builds. [1] /~https://github.com/nodejs/node/pull/3890 PR-URL: /~https://github.com/nodejs/node/pull/4201 Reviewed-By: Ben Noordhuis Reviewed-By: Rod Vagg --- src/node.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node.cc b/src/node.cc index a2698f12bccbe0..0b3c3acf30d239 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3043,7 +3043,9 @@ static void ParseArgs(int* argc, SSL3_ENABLE = true; #endif } else if (strcmp(arg, "--allow-insecure-server-dhparam") == 0) { +#if HAVE_OPENSSL ALLOW_INSECURE_SERVER_DHPARAM = true; +#endif } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) { PrintHelp(); exit(0);