Fix TSSLSocket building with LibreSSL - #3736
Conversation
|
+1, LGTM |
Code reviewFound 1 issue:
#if defined(LIBRESSL_VERSION_NUMBER)
ERR_remove_state(0);
#elif !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_IS_AWSLC)
OPENSSL_thread_stop();
#endifThis is clear-cut at the thrift/lib/cpp/src/thrift/transport/TSSLSocket.cpp Lines 160 to 171 in b1b9a60 thrift/lib/cpp/src/thrift/transport/TSSLSocket.cpp Lines 408 to 419 in b1b9a60 Everything else checked out: both 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
b1b9a60 to
45364c0
Compare
|
The original patch although it did build was based on a mistake. After conferring with a LibreSSL developer the updated patch was the intent. |
Code reviewRe-reviewed after the force-push. The revised patch resolves the earlier finding: moving Found 2 issues:
#3752 removes thrift/lib/cpp/src/thrift/transport/TSSLSocket.cpp Lines 159 to 172 in 45364c0 thrift/lib/cpp/src/thrift/transport/TSSLSocket.cpp Lines 407 to 420 in 45364c0
The commit is a bare subject line with no body; expected Lines 33 to 38 in 45364c0 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Make it compatible with OpenSSL 4.0: - Don't use ERR_remove_state(). It has been an empty stub since OpenSSL 1.1.0 and got finally removed in 4.0- - SSLv3_method(), TLSv1_method(), TLSv1_1_method() and TLSv1_2_method() have been removed. The recommendation is to use TLS_method() instead. LATEST points to TLSv1_2_method which is not going to work. Make SSLTLS and LATEST point to TLS_method() for newer OpenSSL which uses the highest supported protocol version. Adjust the testsuite to only test those two. - The return value of a few functions such as X509_get_subject_name() has been made const. Use the const pointer only for newer OpenSSL. - While at it, pull the libressl related change from apache#3736 Client: cpp,c_glib. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
LibreSSL does not have the function OPENSSL_thread_stop().
[skip ci]anywhere in the commit message to free up build resources.