mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
- MFH Only show switch -y if available
This commit is contained in:
parent
43c7b7f679
commit
c727b68ca1
1 changed files with 5 additions and 2 deletions
|
@ -139,7 +139,7 @@ class PharCommand extends CLICommand
|
||||||
'y' => array(
|
'y' => array(
|
||||||
'typ' => 'privkey',
|
'typ' => 'privkey',
|
||||||
'val' => NULL,
|
'val' => NULL,
|
||||||
'inf' => 'Private key for OpenSSL signing.',
|
'inf' => '<key> Private key for OpenSSL signing.',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -157,6 +157,9 @@ class PharCommand extends CLICommand
|
||||||
$hash_optional = array('SHA-256' => 'SHA256',
|
$hash_optional = array('SHA-256' => 'SHA256',
|
||||||
'SHA-512' => 'SHA512',
|
'SHA-512' => 'SHA512',
|
||||||
'OpenSSL' => 'OpenSSL');
|
'OpenSSL' => 'OpenSSL');
|
||||||
|
if (!in_array('OpenSSL', $hash_avail)) {
|
||||||
|
unset($phar_args['y']);
|
||||||
|
}
|
||||||
|
|
||||||
foreach($hash_optional as $key => $name) {
|
foreach($hash_optional as $key => $name) {
|
||||||
if (in_array($key, $hash_avail)) {
|
if (in_array($key, $hash_avail)) {
|
||||||
|
@ -378,7 +381,7 @@ class PharCommand extends CLICommand
|
||||||
* @param string $arg The phar selection
|
* @param string $arg The phar selection
|
||||||
* @param string $cfg The config option.
|
* @param string $cfg The config option.
|
||||||
* @param string $key The key information.
|
* @param string $key The key information.
|
||||||
* @return string $arg The selected algorithm
|
* @return string $arg The private key.
|
||||||
*/
|
*/
|
||||||
static function cli_arg_typ_privkey($arg, $cfg, $key)
|
static function cli_arg_typ_privkey($arg, $cfg, $key)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue