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

Commit e19cecc

Browse files
joerg-krausejBarz
authored andcommitted
src: fix build error without OpenSSL support
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>
1 parent 49fb41a commit e19cecc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/node.cc

Lines changed: 2 additions & 0 deletions
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)