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.

49 lines
1.5 KiB

  1. diff --git a/daemon/daemon.c b/daemon/daemon.c
  2. index 4c3d5f1..50f5060 100644
  3. --- a/daemon/daemon.c
  4. +++ b/daemon/daemon.c
  5. @@ -769,7 +769,7 @@ daemon_delete(struct daemon* daemon)
  6. # endif
  7. # ifdef HAVE_OPENSSL_CONFIG
  8. EVP_cleanup();
  9. -# if OPENSSL_VERSION_NUMBER < 0x10100000
  10. +# if (OPENSSL_VERSION_NUMBER < 0x10100000) || !defined(OPENSSL_NO_ENGINE)
  11. ENGINE_cleanup();
  12. # endif
  13. CONF_modules_free();
  14. diff --git a/util/net_help.c b/util/net_help.c
  15. index 91368c8..a932010 100644
  16. --- a/util/net_help.c
  17. +++ b/util/net_help.c
  18. @@ -1006,10 +1006,10 @@ void* outgoing_ssl_fd(void* sslctx, int fd)
  19. static lock_basic_type *ub_openssl_locks = NULL;
  20. /** callback that gets thread id for openssl */
  21. -static unsigned long
  22. -ub_crypto_id_cb(void)
  23. +static void
  24. +ub_crypto_id_cb(CRYPTO_THREADID *id)
  25. {
  26. - return (unsigned long)log_thread_get();
  27. + CRYPTO_THREADID_set_numeric(id, (unsigned long)log_thread_get());
  28. }
  29. static void
  30. @@ -1035,7 +1035,7 @@ int ub_openssl_lock_init(void)
  31. for(i=0; i<CRYPTO_num_locks(); i++) {
  32. lock_basic_init(&ub_openssl_locks[i]);
  33. }
  34. - CRYPTO_set_id_callback(&ub_crypto_id_cb);
  35. + CRYPTO_THREADID_set_callback(&ub_crypto_id_cb);
  36. CRYPTO_set_locking_callback(&ub_crypto_lock_cb);
  37. #endif /* OPENSSL_THREADS */
  38. return 1;
  39. @@ -1047,7 +1047,7 @@ void ub_openssl_lock_delete(void)
  40. int i;
  41. if(!ub_openssl_locks)
  42. return;
  43. - CRYPTO_set_id_callback(NULL);
  44. + CRYPTO_THREADID_set_callback(NULL);
  45. CRYPTO_set_locking_callback(NULL);
  46. for(i=0; i<CRYPTO_num_locks(); i++) {
  47. lock_basic_destroy(&ub_openssl_locks[i]);