--- a/third_party/Csocket/Csocket.cc +++ b/third_party/Csocket/Csocket.cc @@ -47,10 +47,16 @@ #include #include #include -#include +#include +#include +#include +#include #ifndef OPENSSL_NO_COMP #include #endif +#ifndef OPENSSL_NO_ENGINE +#include +#endif #define HAVE_ERR_REMOVE_STATE #ifdef OPENSSL_VERSION_NUMBER # if OPENSSL_VERSION_NUMBER >= 0x10000000 @@ -594,9 +600,11 @@ void ShutdownCsocket() #ifndef OPENSSL_IS_BORINGSSL CONF_modules_unload( 1 ); #endif +#if OPENSSL_VERSION_NUMBER < 0x10100000L ERR_free_strings(); EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); +#endif #endif /* HAVE_LIBSSL */ #ifdef HAVE_C_ARES #if ARES_VERSION >= CREATE_ARES_VER( 1, 6, 1 ) @@ -611,12 +619,14 @@ void ShutdownCsocket() #ifdef HAVE_LIBSSL bool InitSSL( ECompType eCompressionType ) { +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_load_error_strings(); if( SSL_library_init() != 1 ) { CS_DEBUG( "SSL_library_init() failed!" ); return( false ); } +#endif #ifndef _WIN32 if( access( "/dev/urandom", R_OK ) == 0 )