0004-src-fix-build-error-without-OpenSSL-support.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From ba6142dbaebe06738686da150043abbd1ef1fbf5 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
  3. Date: Tue, 8 Dec 2015 21:22:45 +0100
  4. Subject: [PATCH] src: fix build error without OpenSSL support
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. PR #3890 [1] introduced the variable ALLOW_INSECURE_SERVER_DHPARAM defined
  9. in src/node_crypto.cc. However, if nodejs is built without OpenSSL support,
  10. the build fails:
  11. error: ‘ALLOW_INSECURE_SERVER_DHPARAM’ was not declared in this scope
  12. ALLOW_INSECURE_SERVER_DHPARAM = true;
  13. Fix this by using the preprocessor macro HAVE_OPENSSL to opt-out the use of
  14. ALLOW_INSECURE_SERVER_DHPARAM in non-OpenSSL builds.
  15. Patch status: Sent upstream [2]
  16. [1] https://github.com/nodejs/node/pull/3890
  17. [2] https://github.com/nodejs/node/pull/4201
  18. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
  19. ---
  20. src/node.cc | 2 ++
  21. 1 file changed, 2 insertions(+)
  22. diff --git a/src/node.cc b/src/node.cc
  23. index 1da8328..e5239ac 100644
  24. --- a/src/node.cc
  25. +++ b/src/node.cc
  26. @@ -3042,7 +3042,9 @@ static void ParseArgs(int* argc,
  27. SSL3_ENABLE = true;
  28. #endif
  29. } else if (strcmp(arg, "--allow-insecure-server-dhparam") == 0) {
  30. +#if HAVE_OPENSSL
  31. ALLOW_INSECURE_SERVER_DHPARAM = true;
  32. +#endif
  33. } else if (strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
  34. PrintHelp();
  35. exit(0);
  36. --
  37. 2.6.3