Skip to content

Support --with-openssl-argon2 on Windows #15713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2024
Merged
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
13 changes: 12 additions & 1 deletion ext/openssl/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ ARG_WITH("openssl", "OpenSSL support", "no,shared");

ARG_WITH("openssl-legacy-provider", "OPENSSL: Load legacy algorithm provider in addition to default provider", "no");

ARG_WITH("openssl-argon2", "OPENSSL: Enable argon2 password hashing (requires OpenSSL >= 3.2)", "no");

if (PHP_OPENSSL != "no") {
var ret = SETUP_OPENSSL("openssl", PHP_OPENSSL);

if (ret >= 2) {
EXTENSION("openssl", "openssl.c xp_ssl.c");
EXTENSION("openssl", "openssl.c openssl_pwhash.c xp_ssl.c");
AC_DEFINE("HAVE_OPENSSL_EXT", 1, "Define to 1 if the PHP extension 'openssl' is available.");
if (PHP_OPENSSL_LEGACY_PROVIDER != "no") {
AC_DEFINE("LOAD_OPENSSL_LEGACY_PROVIDER", 1, "Define to 1 to load the OpenSSL legacy algorithm provider in addition to the default provider.");
}
if (PHP_OPENSSL_ARGON2 != "no") {
if (PHP_ZTS != "no") {
WARNING("OpenSSL argon2 hashing not supported in ZTS mode for now");
} else if (!CHECK_FUNC_IN_HEADER("openssl/thread.h", "OSSL_set_max_threads", PHP_PHP_BUILD + "\\include")) {
WARNING("OpenSSL argon2 hashing requires OpenSSL >= 3.2");
} else {
AC_DEFINE("HAVE_OPENSSL_ARGON2", 1, "Define to 1 to enable OpenSSL argon2 password hashing.");
}
}
}
}
Loading