Skip to content

Commit

Permalink
Merge branch '2.0' into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Nov 22, 2023
2 parents 7cc1814 + 70c7ffe commit 7b893c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phpseclib/Net/SSH2.php
Expand Up @@ -2635,9 +2635,9 @@ private function privatekey_login($username, PrivateKey $privatekey)
$privatekey = $privatekey->withPadding(RSA::SIGNATURE_PKCS1);
$algos = ['rsa-sha2-256', 'rsa-sha2-512', 'ssh-rsa'];
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'])) {
$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);
switch ($algo) {
Expand Down

0 comments on commit 7b893c5

Please sign in to comment.