mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 12:10:59 +00:00
Merge branch '3.0'
This commit is contained in:
commit
d88db1afea
@ -2343,9 +2343,9 @@ class SSH2
|
|||||||
$privatekey = $privatekey->withPadding(RSA::SIGNATURE_PKCS1);
|
$privatekey = $privatekey->withPadding(RSA::SIGNATURE_PKCS1);
|
||||||
$algos = ['rsa-sha2-256', 'rsa-sha2-512', 'ssh-rsa'];
|
$algos = ['rsa-sha2-256', 'rsa-sha2-512', 'ssh-rsa'];
|
||||||
if ($this->server_sig_algs) {
|
if ($this->server_sig_algs) {
|
||||||
$algos = array_intersect($this->server_sig_algs, $algos);
|
$algos = array_intersect($algos, $this->server_sig_algs);
|
||||||
} elseif (isset($this->preferred['hostkey'])) {
|
} elseif (isset($this->preferred['hostkey'])) {
|
||||||
$algos = array_intersect($this->preferred['hostkey'], $algos);
|
$algos = array_intersect($algos, $this->preferred['hostkey']);
|
||||||
}
|
}
|
||||||
$algo = self::array_intersect_first($algos, $this->supported_private_key_algorithms);
|
$algo = self::array_intersect_first($algos, $this->supported_private_key_algorithms);
|
||||||
switch ($algo) {
|
switch ($algo) {
|
||||||
|
Loading…
Reference in New Issue
Block a user