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.

62 lines
1.7 KiB

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