mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +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,
|
"notes": true,
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type": "with-path",
|
"arg-type": "custom",
|
||||||
"lib-depends": [
|
"lib-depends": [
|
||||||
"libargon2"
|
"libargon2",
|
||||||
|
"openssl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pcntl": {
|
"pcntl": {
|
||||||
|
|||||||
@ -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 || !$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"';
|
$args .= ' --with-openssl-argon2 OPENSSL_LIBS="-lz"';
|
||||||
}
|
}
|
||||||
return $args;
|
return $args;
|
||||||
@ -37,7 +37,7 @@ class openssl extends Extension
|
|||||||
public function getWindowsConfigureArg(bool $shared = false): string
|
public function getWindowsConfigureArg(bool $shared = false): string
|
||||||
{
|
{
|
||||||
$args = '--with-openssl';
|
$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';
|
$args .= ' --with-openssl-argon2';
|
||||||
}
|
}
|
||||||
return $args;
|
return $args;
|
||||||
|
|||||||
@ -42,4 +42,14 @@ class password_argon2 extends Extension
|
|||||||
}
|
}
|
||||||
return $patched;
|
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