Merge branch '1.0' into 2.0

This commit is contained in:
terrafrost 2023-11-22 08:14:20 -06:00
commit 70c7ffe42c

View File

@ -2818,9 +2818,9 @@ class SSH2
$algos = array('rsa-sha2-256', 'rsa-sha2-512', 'ssh-rsa'); $algos = array('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 = $this->_array_intersect_first($algos, $this->supported_private_key_algorithms); $algo = $this->_array_intersect_first($algos, $this->supported_private_key_algorithms);