Skip to content

Commit 3b67b4e

Browse files
committed
check OSSL_KDF_PARAM_ARGON2_LANES instead of OSSL_set_max_threads
1 parent 668b3f0 commit 3b67b4e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ext/openssl/config0.m4

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ if test "$PHP_OPENSSL" != "no"; then
5050
if test "$PHP_THREAD_SAFETY" != "no"; then
5151
AC_MSG_ERROR([Not supported in ZTS mode for now])
5252
fi
53-
PHP_CHECK_LIBRARY([crypto], [OSSL_set_max_threads],
54-
[AC_DEFINE(HAVE_OPENSSL_ARGON2,1,[ Enable argon2 password hashing ])],
53+
CFLAGS_SAVE=$CFLAGS
54+
CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
55+
AC_CHECK_DECL([OSSL_KDF_PARAM_ARGON2_LANES],
56+
[AC_DEFINE([HAVE_OPENSSL_ARGON2],[1],[ Enable argon2 password hashing ])],
5557
[AC_MSG_ERROR([argon2 hashing requires OpenSSL 3.2])],
56-
[$OPENSSL_LIBS])
58+
[[#include <openssl/core_names.h>]])
59+
CFLAGS=$CFLAGS_SAVE
5760
fi
5861
fi

0 commit comments

Comments
 (0)