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.

48 lines
1.0 KiB

  1. From 43e323f5fd61ddf2c2adc2a5c12455b6578c059a Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Wed, 12 Dec 2018 13:40:37 -0800
  4. Subject: [PATCH 1/2] Fix compilation when OpenSSL has no ENGINE support
  5. This will be the case in OpenWrt soon.
  6. ---
  7. src/tincd.c | 6 ++++++
  8. 1 file changed, 6 insertions(+)
  9. diff --git a/src/tincd.c b/src/tincd.c
  10. index 7b882c7a..bdac0c9d 100644
  11. --- a/src/tincd.c
  12. +++ b/src/tincd.c
  13. @@ -37,7 +37,9 @@
  14. #include <openssl/rsa.h>
  15. #include <openssl/pem.h>
  16. #include <openssl/evp.h>
  17. +#ifndef OPENSSL_NO_ENGINE
  18. #include <openssl/engine.h>
  19. +#endif
  20. #ifdef HAVE_LZO
  21. #include LZO1X_H
  22. @@ -685,8 +687,10 @@ int main(int argc, char **argv) {
  23. init_configuration(&config_tree);
  24. +#ifndef OPENSSL_NO_ENGINE
  25. ENGINE_load_builtin_engines();
  26. ENGINE_register_all_complete();
  27. +#endif
  28. OpenSSL_add_all_algorithms();
  29. @@ -809,7 +813,9 @@ end:
  30. EVP_cleanup();
  31. ERR_free_strings();
  32. +#ifndef OPENSSL_NO_ENGINE
  33. ENGINE_cleanup();
  34. +#endif
  35. exit_configuration(&config_tree);
  36. list_delete_list(cmdline_conf);
  37. --
  38. 2.20.0