зеркало из https://github.com/github/putty.git
Emit a distinct error message when the SSH server's host key is invalid.
This also means that FUZZING can just ignore host-key verification failure while preserving invalid-host-key errors.
This commit is contained in:
Родитель
12702cb17e
Коммит
7a5cb2838f
10
ssh.c
10
ssh.c
|
@ -7126,13 +7126,17 @@ static void do_ssh2_transport(Ssh ssh, const void *vin, int inlen,
|
|||
dmemdump(s->exchange_hash, ssh->kex->hash->hlen);
|
||||
#endif
|
||||
|
||||
if (!s->hkey ||
|
||||
!ssh->hostkey->verifysig(s->hkey, s->sigdata, s->siglen,
|
||||
if (!s->hkey) {
|
||||
bombout(("Server's host key is invalid"));
|
||||
crStopV;
|
||||
}
|
||||
|
||||
if (!ssh->hostkey->verifysig(s->hkey, s->sigdata, s->siglen,
|
||||
(char *)s->exchange_hash,
|
||||
ssh->kex->hash->hlen)) {
|
||||
#ifndef FUZZING
|
||||
bombout(("Server's host key did not match the signature supplied"));
|
||||
crStopV;
|
||||
crStopV;f
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче