mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 19:54:57 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
f8ff1aa27f
@ -1819,9 +1819,14 @@ class SSH2
|
||||
}
|
||||
|
||||
if ($public_key_format != $expected_key_format || $this->signature_format != $server_host_key_algorithm) {
|
||||
switch (true) {
|
||||
case $this->signature_format == $server_host_key_algorithm:
|
||||
case $server_host_key_algorithm != 'rsa-sha2-256' && $server_host_key_algorithm != 'rsa-sha2-512':
|
||||
case $this->signature_format != 'ssh-rsa':
|
||||
user_error('Server Host Key Algorithm Mismatch');
|
||||
return $this->_disconnect(NET_SSH2_DISCONNECT_KEY_EXCHANGE_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
$packet = pack(
|
||||
'C',
|
||||
|
Loading…
Reference in New Issue
Block a user