Skip to content

Commit b9f1e29

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 9268611 + 05ba660 commit b9f1e29

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#[=============================================================================[
2+
# FindOpenSSL
3+
4+
This module overrides the upstream CMake `FindOpenSSL` module with few
5+
customizations:
6+
7+
* Added OpenSSL_VERSION result variable for CMake < 4.2.
8+
9+
See: https://cmake.org/cmake/help/latest/module/FindOpenSSL.html
10+
#]=============================================================================]
11+
12+
# Find package with upstream CMake find module. Absolute path prevents the
13+
# maximum nesting/recursion depth error on some systems, like macOS.
14+
include(${CMAKE_ROOT}/Modules/FindOpenSSL.cmake)
15+
16+
if(CMAKE_VERSION VERSION_LESS 4.2)
17+
set(OpenSSL_VERSION "${OPENSSL_VERSION}")
18+
endif()

cmake/ext/openssl/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ if(TARGET OpenSSL::SSL)
176176
check_symbol_exists(RAND_egd openssl/rand.h HAVE_RAND_EGD)
177177
cmake_pop_check_state()
178178

179-
if(OPENSSL_VERSION VERSION_LESS 3 AND PHP_EXT_OPENSSL_LEGACY_PROVIDER)
179+
if(OpenSSL_VERSION VERSION_LESS 3 AND PHP_EXT_OPENSSL_LEGACY_PROVIDER)
180180
message(
181181
WARNING
182182
"PHP_EXT_OPENSSL_LEGACY_PROVIDER is not available for OpenSSL version "
183-
"${OPENSSL_VERSION} and won't be enabled."
183+
"${OpenSSL_VERSION} and won't be enabled."
184184
)
185185
elseif(
186-
OPENSSL_VERSION VERSION_GREATER_EQUAL 3
186+
OpenSSL_VERSION VERSION_GREATER_EQUAL 3
187187
AND PHP_EXT_OPENSSL_LEGACY_PROVIDER
188188
)
189189
set(LOAD_OPENSSL_LEGACY_PROVIDER TRUE)
@@ -213,7 +213,7 @@ if(TARGET OpenSSL::SSL)
213213
)
214214
cmake_pop_check_state()
215215

216-
if(OPENSSL_VERSION VERSION_LESS 3.2 OR NOT HAVE_OPENSSL_ARGON2)
216+
if(OpenSSL_VERSION VERSION_LESS 3.2 OR NOT HAVE_OPENSSL_ARGON2)
217217
message(
218218
FATAL_ERROR
219219
"The OpenSSL Argon2 password hashing requires OpenSSL 3.2 or newer."

0 commit comments

Comments
 (0)