Commit 0edb38e
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 all three
single-packet rewriters.
- The harness KEX algorithm falls back to curve25519-sha256, then
ecdh-sha2-nistp256, when no plain diffie-hellman-group is built.
- 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 5336ee5 commit 0edb38e
2 files changed
Lines changed: 450 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5944 | 5944 | | |
5945 | 5945 | | |
5946 | 5946 | | |
| 5947 | + | |
| 5948 | + | |
| 5949 | + | |
| 5950 | + | |
| 5951 | + | |
| 5952 | + | |
5947 | 5953 | | |
5948 | 5954 | | |
5949 | 5955 | | |
| |||
7627 | 7633 | | |
7628 | 7634 | | |
7629 | 7635 | | |
| 7636 | + | |
| 7637 | + | |
| 7638 | + | |
| 7639 | + | |
| 7640 | + | |
| 7641 | + | |
| 7642 | + | |
| 7643 | + | |
| 7644 | + | |
7630 | 7645 | | |
7631 | 7646 | | |
7632 | 7647 | | |
| |||
8027 | 8042 | | |
8028 | 8043 | | |
8029 | 8044 | | |
| 8045 | + | |
| 8046 | + | |
| 8047 | + | |
| 8048 | + | |
| 8049 | + | |
| 8050 | + | |
8030 | 8051 | | |
8031 | 8052 | | |
8032 | 8053 | | |
| |||
16281 | 16302 | | |
16282 | 16303 | | |
16283 | 16304 | | |
16284 | | - | |
16285 | | - | |
16286 | | - | |
| 16305 | + | |
| 16306 | + | |
16287 | 16307 | | |
16288 | 16308 | | |
16289 | 16309 | | |
| |||
0 commit comments