mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-04 12:58:28 +00:00
SSH2: use phpseclib's preferred order for auth algorithms
This commit is contained in:
parent
356ab5f76a
commit
49c9439878
@ -2830,9 +2830,9 @@ class Net_SSH2
|
||||
|
||||
$algos = array('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 = $this->_array_intersect_first($algos, $this->supported_private_key_algorithms);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user