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.

47 lines
1.2 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. @@ -594,9 +600,11 @@ void ShutdownCsocket()
  22. #ifndef OPENSSL_IS_BORINGSSL
  23. CONF_modules_unload( 1 );
  24. #endif
  25. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  26. ERR_free_strings();
  27. EVP_cleanup();
  28. CRYPTO_cleanup_all_ex_data();
  29. +#endif
  30. #endif /* HAVE_LIBSSL */
  31. #ifdef HAVE_C_ARES
  32. #if ARES_VERSION >= CREATE_ARES_VER( 1, 6, 1 )
  33. @@ -611,12 +619,14 @@ void ShutdownCsocket()
  34. #ifdef HAVE_LIBSSL
  35. bool InitSSL( ECompType eCompressionType )
  36. {
  37. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  38. SSL_load_error_strings();
  39. if( SSL_library_init() != 1 )
  40. {
  41. CS_DEBUG( "SSL_library_init() failed!" );
  42. return( false );
  43. }
  44. +#endif
  45. #ifndef _WIN32
  46. if( access( "/dev/urandom", R_OK ) == 0 )