mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-15 01:44:06 +00:00
Merge branch '2.0'
This commit is contained in:
commit
ebc0701f8a
@ -4968,12 +4968,10 @@ class SSH2
|
|||||||
case 'ssh-rsa':
|
case 'ssh-rsa':
|
||||||
case 'rsa-sha2-256':
|
case 'rsa-sha2-256':
|
||||||
case 'rsa-sha2-512':
|
case 'rsa-sha2-512':
|
||||||
if (strlen($signature) < 15) {
|
// could be ssh-rsa, rsa-sha2-256, rsa-sha2-512
|
||||||
return false;
|
// we don't check here because we already checked in key_exchange
|
||||||
}
|
// some signatures have the type embedded within the message and some don't
|
||||||
Strings::shift($signature, 11);
|
Strings::unpackSSH2('s', $signature);
|
||||||
$temp = unpack('Nlength', Strings::shift($signature, 4));
|
|
||||||
$signature = Strings::shift($signature, $temp['length']);
|
|
||||||
|
|
||||||
$key = RSA::loadFormat('OpenSSH', $server_public_host_key)
|
$key = RSA::loadFormat('OpenSSH', $server_public_host_key)
|
||||||
->withPadding(RSA::SIGNATURE_PKCS1);
|
->withPadding(RSA::SIGNATURE_PKCS1);
|
||||||
|
Loading…
Reference in New Issue
Block a user