Skip to content

Add additional regress test for DoKexDhReply#923

Open
yosuke-wolfssl wants to merge 1 commit intowolfSSL:masterfrom
yosuke-wolfssl:f_2484
Open

Add additional regress test for DoKexDhReply#923
yosuke-wolfssl wants to merge 1 commit intowolfSSL: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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

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.

3 participants