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.

56 lines
1.4 KiB

  1. --- a/third_party/Csocket/Csocket.cc
  2. +++ b/third_party/Csocket/Csocket.cc
  3. @@ -47,10 +47,16 @@
  4. #include <stdio.h>
  5. #include <openssl/ssl.h>
  6. #include <openssl/conf.h>
  7. -#include <openssl/engine.h>
  8. +#include <openssl/bn.h>
  9. +#include <openssl/dh.h>
  10. +#include <openssl/dsa.h>
  11. +#include <openssl/rsa.h>
  12. #ifndef OPENSSL_NO_COMP
  13. #include <openssl/comp.h>
  14. #endif
  15. +#ifndef OPENSSL_NO_ENGINE
  16. +#include <openssl/engine.h>
  17. +#endif
  18. #define HAVE_ERR_REMOVE_STATE
  19. #ifdef OPENSSL_VERSION_NUMBER
  20. # if OPENSSL_VERSION_NUMBER >= 0x10000000
  21. @@ -588,15 +594,17 @@ void ShutdownCsocket()
  22. #elif defined( HAVE_ERR_REMOVE_STATE )
  23. ERR_remove_state( 0 );
  24. #endif
  25. -#ifndef OPENSSL_NO_ENGINE
  26. - ENGINE_cleanup();
  27. -#endif
  28. #ifndef OPENSSL_IS_BORINGSSL
  29. CONF_modules_unload( 1 );
  30. #endif
  31. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  32. +#ifndef OPENSSL_NO_ENGINE
  33. + ENGINE_cleanup();
  34. +#endif
  35. ERR_free_strings();
  36. EVP_cleanup();
  37. CRYPTO_cleanup_all_ex_data();
  38. +#endif
  39. #endif /* HAVE_LIBSSL */
  40. #ifdef HAVE_C_ARES
  41. #if ARES_VERSION >= CREATE_ARES_VER( 1, 6, 1 )
  42. @@ -611,12 +619,14 @@ void ShutdownCsocket()
  43. #ifdef HAVE_LIBSSL
  44. bool InitSSL( ECompType eCompressionType )
  45. {
  46. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  47. SSL_load_error_strings();
  48. if( SSL_library_init() != 1 )
  49. {
  50. CS_DEBUG( "SSL_library_init() failed!" );
  51. return( false );
  52. }
  53. +#endif
  54. #ifndef _WIN32
  55. if( access( "/dev/urandom", R_OK ) == 0 )