Skip to content

Commit

Permalink
THRIFT-3878: fix interop with newer OpenSSL libraries
Browse files Browse the repository at this point in the history
This closes apache#1102
  • Loading branch information
James E. King, III authored and Gonzalo Aguilar Delgado committed Jan 24, 2017
1 parent 20b1335 commit f91b759
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/cpp/src/thrift/transport/TSSLSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ void initializeOpenSSL() {
SSL_library_init();
SSL_load_error_strings();
// static locking
// newer versions of OpenSSL changed CRYPTO_num_locks - see THRIFT-3878
#ifdef CRYPTO_num_locks
mutexes = boost::shared_array<Mutex>(new Mutex[CRYPTO_num_locks()]);
#else
mutexes = boost::shared_array<Mutex>(new Mutex[ ::CRYPTO_num_locks()]);
#endif
if (mutexes == NULL) {
throw TTransportException(TTransportException::INTERNAL_ERROR,
"initializeOpenSSL() failed, "
Expand Down

0 comments on commit f91b759

Please sign in to comment.