mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
only enable one of password-argon2 or openssl-argon2
This commit is contained in:
parent
4fb4e42896
commit
3789c7c335
@ -531,9 +531,10 @@
|
||||
},
|
||||
"notes": true,
|
||||
"type": "builtin",
|
||||
"arg-type": "with-path",
|
||||
"arg-type": "custom",
|
||||
"lib-depends": [
|
||||
"libargon2"
|
||||
"libargon2",
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"pcntl": {
|
||||
|
||||
@ -28,7 +28,7 @@ class openssl extends Extension
|
||||
{
|
||||
$openssl_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : ' --with-openssl-dir=' . BUILD_ROOT_PATH;
|
||||
$args = '--with-openssl=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $openssl_dir;
|
||||
if ($this->builder->getPHPVersionID() >= 80500 || !$this->builder->getOption('enable-zts')) {
|
||||
if ($this->builder->getPHPVersionID() >= 80500 || ($this->builder->getPHPVersionID() >= 80400 && !$this->builder->getOption('enable-zts'))) {
|
||||
$args .= ' --with-openssl-argon2 OPENSSL_LIBS="-lz"';
|
||||
}
|
||||
return $args;
|
||||
@ -37,7 +37,7 @@ class openssl extends Extension
|
||||
public function getWindowsConfigureArg(bool $shared = false): string
|
||||
{
|
||||
$args = '--with-openssl';
|
||||
if ($this->builder->getPHPVersionID() >= 80500) {
|
||||
if ($this->builder->getPHPVersionID() >= 80500 || ($this->builder->getPHPVersionID() >= 80400 && !$this->builder->getOption('enable-zts'))) {
|
||||
$args .= ' --with-openssl-argon2';
|
||||
}
|
||||
return $args;
|
||||
|
||||
@ -42,4 +42,14 @@ class password_argon2 extends Extension
|
||||
}
|
||||
return $patched;
|
||||
}
|
||||
|
||||
public function getConfigureArg(bool $shared = false): string
|
||||
{
|
||||
if ($this->builder->getLib('openssl') !== null) {
|
||||
if ($this->builder->getPHPVersionID() >= 80500 || ($this->builder->getPHPVersionID() >= 80400 && !$this->builder->getOption('enable-zts'))) {
|
||||
return '--without-password-argon2'; // use --with-openssl-argon2 in openssl extension instead
|
||||
}
|
||||
}
|
||||
return '--with-password-argon2';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user