From 5f87b836a58040459d06288cfe425e6fa96fddd0 Mon Sep 17 00:00:00 2001 From: Mario Emmenlauer Date: Mon, 9 Oct 2023 14:42:27 +0200 Subject: [PATCH] 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