Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions ext/openssl/config0.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ PHP_ARG_WITH([openssl-legacy-provider],

PHP_ARG_WITH([openssl-argon2],
[whether to enable argon2 password hashing (requires OpenSSL >= 3.2)],
[AS_HELP_STRING([--with-openssl-argon2],
[OPENSSL: Enable argon2 password hashing])],
[no],
[AS_HELP_STRING([--without-openssl-argon2],
[OPENSSL: Disable argon2 password hashing])],
[yes],
[no])

if test "$PHP_OPENSSL" != "no"; then
Expand All @@ -48,11 +48,13 @@ if test "$PHP_OPENSSL" != "no"; then
[Define to 1 to load the OpenSSL legacy algorithm provider in addition to
the default provider.])])

AS_VAR_IF([PHP_OPENSSL_ARGON2], [no],, [
dnl Implicit default is yes; only error if explicitly set and unavailable
AS_IF([test "$PHP_OPENSSL_ARGON2" != "no"], [
PHP_CHECK_LIBRARY([crypto], [OSSL_set_max_threads],
[AC_DEFINE([HAVE_OPENSSL_ARGON2], [1],
[Define to 1 to enable OpenSSL argon2 password hashing.])],
[AC_MSG_ERROR([argon2 hashing requires OpenSSL 3.2])],
[AS_IF([test "x$with_openssl_argon2" = "xyes"],
[AC_MSG_ERROR([argon2 hashing requires OpenSSL 3.2])])],
[$OPENSSL_LIBS])
])
fi