Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions lib/cpp/src/thrift/transport/TSSLSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,16 @@ void cleanupOpenSSL() {
#if (OPENSSL_VERSION_NUMBER < OPENSSL_ENGINE_CLEANUP_REQUIRED_BEFORE)
ENGINE_cleanup(); // https://www.openssl.org/docs/man1.1.0/crypto/ENGINE_cleanup.html - cleanup call is needed before 1.1.0
#endif
#if !defined(OPENSSL_IS_AWSLC)
#if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_IS_AWSLC)
CONF_modules_unload(1);
#endif
EVP_cleanup();
CRYPTO_cleanup_all_ex_data();
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(OPENSSL_IS_AWSLC)
#if OPENSSL_VERSION_NUMBER >= 0x10100000
# if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_IS_AWSLC)
// https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_thread_stop.html
OPENSSL_thread_stop();
# endif
#else
// ERR_remove_state() was deprecated in OpenSSL 1.0.0 and ERR_remove_thread_state()
// was deprecated in OpenSSL 1.1.0; these functions and should not be used.
Expand Down Expand Up @@ -395,9 +397,11 @@ void TSSLSocket::close() {
SSL_free(ssl_);
ssl_ = nullptr;
handshakeCompleted_ = false;
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(OPENSSL_IS_AWSLC)
#if OPENSSL_VERSION_NUMBER >= 0x10100000
# if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_IS_AWSLC)
// https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_thread_stop.html
OPENSSL_thread_stop();
# endif
#else
// ERR_remove_state() was deprecated in OpenSSL 1.0.0 and ERR_remove_thread_state()
// was deprecated in OpenSSL 1.1.0; these functions and should not be used.
Expand Down