Commit d80b37e
committed
internal: send a disconnect when key exchange fails
- DoKexDhInit() sends SSH_MSG_DISCONNECT with KEY_EXCHANGE_FAILED on
WS_CRYPTO_FAILED and WS_PUBKEY_REJECTED_E, DoKexDhGexGroup() on
WS_CRYPTO_FAILED and WS_DH_SIZE_E.
- DoKexDhReply() sends KEY_EXCHANGE_FAILED on WS_CRYPTO_FAILED and
HOST_KEY_NOT_VERIFIABLE on WS_PUBKEY_REJECTED_E.
- DuplexEndpoint records the reason code of a plaintext outbound
disconnect, and InitKexReplyHarnessKex() takes an explicit KEX
algorithm.
- New mutator modes shorten f and e, write a zero-length e, cut the
GEX prime below the requested floor and set the GEX generator to 1;
LocateSinglePacketPayload() finds the payload for the single-packet
rewriters.
- Tests assert the reason code on the wire for each new mode and for
host key rejection, and assert no disconnect on a successful
handshake.
Issue: F-88381 parent f494688 commit d80b37e
2 files changed
Lines changed: 438 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5936 | 5936 | | |
5937 | 5937 | | |
5938 | 5938 | | |
| 5939 | + | |
| 5940 | + | |
| 5941 | + | |
| 5942 | + | |
| 5943 | + | |
| 5944 | + | |
5939 | 5945 | | |
5940 | 5946 | | |
5941 | 5947 | | |
| |||
7619 | 7625 | | |
7620 | 7626 | | |
7621 | 7627 | | |
| 7628 | + | |
| 7629 | + | |
| 7630 | + | |
| 7631 | + | |
| 7632 | + | |
| 7633 | + | |
| 7634 | + | |
| 7635 | + | |
| 7636 | + | |
7622 | 7637 | | |
7623 | 7638 | | |
7624 | 7639 | | |
| |||
8019 | 8034 | | |
8020 | 8035 | | |
8021 | 8036 | | |
| 8037 | + | |
| 8038 | + | |
| 8039 | + | |
| 8040 | + | |
| 8041 | + | |
| 8042 | + | |
8022 | 8043 | | |
8023 | 8044 | | |
8024 | 8045 | | |
| |||
0 commit comments