Skip to content

Add additional regress test for DoKexDhReply - #923

Merged
ejohnstown merged 1 commit into
wolfSSL:masterfrom
yosuke-wolfssl:f_2484
Apr 21, 2026
Merged

Add additional regress test for DoKexDhReply#923
ejohnstown merged 1 commit into
wolfSSL:masterfrom
yosuke-wolfssl:f_2484

Conversation

@yosuke-wolfssl

Copy link
Copy Markdown
Contributor

There is a missing scenario of regress test for DoKexDhReply().
This PR adds a test that sets a publicKeyCheckCb which returns non-zero (reject), then attempts a connection. Then it verifies the client gets WS_PUBKEY_REJECTED_E.

@yosuke-wolfssl yosuke-wolfssl self-assigned this Apr 16, 2026
Copilot AI review requested due to automatic review settings April 16, 2026 01:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a missing regression scenario for DoKexDhReply() where the client’s publicKeyCheckCb is present but explicitly rejects the server host key, ensuring the client fails the handshake with WS_PUBKEY_REJECTED_E.

Changes:

  • Introduces a RejectAnyServerHostKey() callback that always rejects the server host key.
  • Adds a new KEXDH reply regress test that sets the reject callback and asserts the client error is WS_PUBKEY_REJECTED_E.
  • Hooks the new test into the existing KEXDH_REPLY_REGRESS_KEX_ALGO test block in main().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ejohnstown
ejohnstown merged commit a608f19 into wolfSSL:master Apr 21, 2026
135 checks passed
@yosuke-wolfssl
yosuke-wolfssl deleted the f_2484 branch April 21, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants