You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. From a3643c6076e60f778e069340100e86bec5786e5f Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Thu, 8 Nov 2018 16:01:05 -0800
  4. Subject: [PATCH] openssl: Do not use engines when OpenSSL does not support
  5. * src/openssl.c: Check for OPENSSL_NO_ENGINE before
  6. including openssl/engine.h and before calling ENGINE_load_builtin_engines()
  7. Fixes compilation with no engines compiled.
  8. Copyright-paperwork-exempt: Yes
  9. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  10. ---
  11. src/openssl.c | 4 ++++
  12. 1 file changed, 4 insertions(+)
  13. diff --git a/src/openssl.c b/src/openssl.c
  14. index 6cf4afe9..73e7f0f4 100644
  15. --- a/src/openssl.c
  16. +++ b/src/openssl.c
  17. @@ -43,8 +43,10 @@ as that of the covered work. */
  18. #include <openssl/bio.h>
  19. #if OPENSSL_VERSION_NUMBER >= 0x00907000
  20. #include <openssl/conf.h>
  21. +#ifndef OPENSSL_NO_ENGINE
  22. #include <openssl/engine.h>
  23. #endif
  24. +#endif
  25. #include "utils.h"
  26. #include "connect.h"
  27. @@ -193,7 +195,9 @@ ssl_init (void)
  28. #if OPENSSL_VERSION_NUMBER >= 0x00907000
  29. OPENSSL_load_builtin_modules();
  30. +#ifndef OPENSSL_NO_ENGINE
  31. ENGINE_load_builtin_engines();
  32. +#endif
  33. CONF_modules_load_file(NULL, NULL,
  34. CONF_MFLAGS_DEFAULT_SECTION|CONF_MFLAGS_IGNORE_MISSING_FILE);
  35. #endif