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.1 KiB

  1. --- a/src/main.c
  2. +++ b/src/main.c
  3. @@ -1155,10 +1155,12 @@ main(int argc, char **argv)
  4. sigprocmask(SIG_BLOCK, &set, NULL);
  5. trap_init(argv[0]);
  6. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  7. /* SSL library init */
  8. OPENSSL_config(NULL);
  9. SSL_load_error_strings();
  10. SSL_library_init();
  11. +#endif
  12. /* Rand seed */
  13. randseed.thread_id = (void *)main_tid;
  14. gettimeofday(&randseed.tv, NULL);
  15. @@ -1346,8 +1348,11 @@ main(int argc, char **argv)
  16. if(opt_fork)
  17. unlink(opt_pidpath);
  18. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  19. /* OpenSSL - welcome to the "cleanup" hell */
  20. +#ifndef OPENSSL_NO_ENGINE
  21. ENGINE_cleanup();
  22. +#endif
  23. RAND_cleanup();
  24. CRYPTO_cleanup_all_ex_data();
  25. EVP_cleanup();
  26. @@ -1355,12 +1360,13 @@ main(int argc, char **argv)
  27. #if !defined(OPENSSL_NO_COMP)
  28. COMP_zlib_cleanup();
  29. #endif
  30. - ERR_remove_state(0);
  31. + ERR_remove_thread_state(NULL);
  32. ERR_free_strings();
  33. #if !defined(OPENSSL_NO_COMP) && OPENSSL_VERSION_NUMBER < 0x1010006f
  34. sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
  35. #endif
  36. /* end of OpenSSL cleanup code */
  37. +#endif
  38. #if ENABLE_DBUS_1
  39. extern void dbus_shutdown(void);