Description: Support building MySQL Shell against OpenSSL 4
 Allow OpenSSL versions over 3 when checking with cmake, and apply the
 OpenSSL 3+ deprecation-warning downgrade to OpenSSL 4 too.
Author: Lena Voytek <lena.voytek@canonical.com>
Forwarded: not-needed
Last-Update: 2026-08-17
---
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -134,8 +134,8 @@ MACRO(FIND_OPENSSL_VERSION)
       "^.*${version_part}[\t ]+([0-9]+).*" "\\1"
       ${version_part} "${${version_part}}")
   ENDFOREACH()
-  IF(OPENSSL_VERSION_MAJOR VERSION_EQUAL 3)
-    # OpenSSL 3
+  IF(OPENSSL_VERSION_MAJOR VERSION_GREATER_EQUAL 3)
+    # OpenSSL 3 and later
     SET(OPENSSL_FIX_VERSION "${OPENSSL_VERSION_PATCH}")
   ELSE()
     # Verify version number. Version information looks like:
@@ -781,9 +781,9 @@ MACRO(MYSQL_CHECK_SSL_DLLS)
   ENDIF()
 ENDMACRO()
 
-# Downgrade OpenSSL 3 deprecation warnings.
+# Downgrade OpenSSL 3+ deprecation warnings.
 MACRO(DOWNGRADE_OPENSSL3_DEPRECATION_WARNINGS)
-  IF(OPENSSL_VERSION_MAJOR VERSION_EQUAL 3)
+  IF(OPENSSL_VERSION_MAJOR VERSION_GREATER_EQUAL 3)
     IF(MY_COMPILER_IS_GNU_OR_CLANG)
       ADD_COMPILE_FLAGS(${ARGV}
         COMPILE_FLAGS "-Wno-error=deprecated-declarations")
