Skip to content

Commit

Permalink
src: fix build error without OpenSSL support
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
joerg-krause authored and Myles Borins committed Feb 11, 2016
1 parent da66166 commit 28dddab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3054,7 +3054,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

0 comments on commit 28dddab

Please sign in to comment.