This is an automated email from the ASF dual-hosted git repository.
emmenlau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 5f87b836a lib/cpp/test/Security*Test.cpp: Fix the check for OpenSSL
version
new ffa4f541a Merge pull request #2864 from
BioDataAnalysis/emmenlau_fix_openssl_version_macros
5f87b836a is described below
commit 5f87b836a58040459d06288cfe425e6fa96fddd0
Author: Mario Emmenlauer <[email protected]>
AuthorDate: Mon Oct 9 14:42:27 2023 +0200
lib/cpp/test/Security*Test.cpp: Fix the check for OpenSSL version
---
lib/cpp/test/SecurityFromBufferTest.cpp | 2 +-
lib/cpp/test/SecurityTest.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/cpp/test/SecurityFromBufferTest.cpp
b/lib/cpp/test/SecurityFromBufferTest.cpp
index 5fba5ee90..65ec8b6a2 100644
--- a/lib/cpp/test/SecurityFromBufferTest.cpp
+++ b/lib/cpp/test/SecurityFromBufferTest.cpp
@@ -199,7 +199,7 @@ BOOST_AUTO_TEST_CASE(ssl_security_matrix) {
try {
// matrix of connection success between client and server with different
SSLProtocol selections
static_assert(apache::thrift::transport::LATEST == 5, "Mismatch in
assumed number of ssl protocols");
- bool ossl1 = OPENSSL_VERSION_MAJOR == 1;
+ bool ossl1 = (OPENSSL_VERSION_NUMBER < 0x30000000L);
bool matrix[apache::thrift::transport::LATEST +
1][apache::thrift::transport::LATEST + 1] =
{
// server = SSLTLS SSLv2 SSLv3 TLSv1_0 TLSv1_1 TLSv1_2
diff --git a/lib/cpp/test/SecurityTest.cpp b/lib/cpp/test/SecurityTest.cpp
index ab3d99b2b..06ee8fe57 100644
--- a/lib/cpp/test/SecurityTest.cpp
+++ b/lib/cpp/test/SecurityTest.cpp
@@ -221,7 +221,7 @@ BOOST_AUTO_TEST_CASE(ssl_security_matrix)
{
// matrix of connection success between client and server with
different SSLProtocol selections
static_assert(apache::thrift::transport::LATEST == 5, "Mismatch in
assumed number of ssl protocols");
- bool ossl1 = OPENSSL_VERSION_MAJOR == 1;
+ bool ossl1 = (OPENSSL_VERSION_NUMBER < 0x30000000L);
bool matrix[apache::thrift::transport::LATEST +
1][apache::thrift::transport::LATEST + 1] =
{
// server = SSLTLS SSLv2 SSLv3 TLSv1_0 TLSv1_1 TLSv1_2