Add argon2 support for PHP-NTS < 8.5

This commit is contained in:
crazywhalecc 2025-08-03 22:59:40 +08:00
parent 3c09ba59d7
commit ea4905cd0d
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -28,7 +28,7 @@ class openssl extends Extension
{ {
$openssl_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : ' --with-openssl-dir=' . BUILD_ROOT_PATH; $openssl_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : ' --with-openssl-dir=' . BUILD_ROOT_PATH;
$args = '--with-openssl=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $openssl_dir; $args = '--with-openssl=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $openssl_dir;
if ($this->builder->getPHPVersionID() >= 80500) { if ($this->builder->getPHPVersionID() >= 80500 || !$this->builder->getOption('enable-zts')) {
$args .= ' --with-openssl-argon2 OPENSSL_LIBS="-lz"'; $args .= ' --with-openssl-argon2 OPENSSL_LIBS="-lz"';
} }
return $args; return $args;