Skip to content

Commit 28dddab

Browse files
joerg-krauseMyles Borins
authored and
Myles Borins
committed
src: fix build error without OpenSSL support
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] #3890 PR-URL: #4201 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rod Vagg <rod@vagg.org>
1 parent da66166 commit 28dddab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/node.cc

+2
Original file line numberDiff line numberDiff line change
@@ -3054,7 +3054,9 @@ static void ParseArgs(int* argc,
30543054
SSL3_ENABLE = true;
30553055
#endif
30563056
} else if (strcmp(arg, "--allow-insecure-server-dhparam") == 0) {
3057+
#if HAVE_OPENSSL
30573058
ALLOW_INSECURE_SERVER_DHPARAM = true;
3059+
#endif
30583060
} else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
30593061
PrintHelp();
30603062
exit(0);

0 commit comments

Comments
 (0)