Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
  • Loading branch information
joerg-krause committed Dec 8, 2015
commit f697f454a18d4a6754576425bf32f8b002281170
2 changes: 2 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down