1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix error message when KEXINIT negotiation fails.

By putting the wrong error-type enum value in a ScanKexinitsResult, I
accidentally caused nonsense messages of the form

  Selected key exchange algorithm "foo,bar,baz" does not correspond to any supported algorithm

where "foo,bar,baz" is the full comma-separated list sent by the
server, so it's not even _an_ algorithm as the message suggests.

Now the message is the one it should have been all along:

  Couldn't agree a key exchange algorithm (available: foo,bar,baz)
This commit is contained in:
Simon Tatham 2024-12-07 19:28:44 +00:00
parent 296b6291d3
commit 7da3449586

View File

@ -1166,7 +1166,7 @@ static ScanKexinitsResult ssh2_scan_kexinits(
* Otherwise, any match failure _is_ a fatal error.
*/
ScanKexinitsResult skr = {
.success = false, .error = SKR_UNKNOWN_ID,
.success = false, .error = SKR_NO_AGREEMENT,
.kind = kexlist_descr[i], .desc = slists[i],
};
return skr;