Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Commit

Permalink
src: fix build error without OpenSSL support
Browse files Browse the repository at this point in the history
PR nodejs#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] nodejs/node#3890

PR-URL: nodejs/node#4201
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
  • Loading branch information
joerg-krause authored and jBarz committed Nov 4, 2016
1 parent 49fb41a commit e19cecc
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 e19cecc

Please sign in to comment.