Skip to content

Add unit tests and regress tests#990

Open
yosuke-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
yosuke-wolfssl:addTests
Open

Add unit tests and regress tests#990
yosuke-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
yosuke-wolfssl:addTests

Conversation

@yosuke-wolfssl
Copy link
Copy Markdown
Contributor

This PR adds the new tests to harden wolfSSH.

  • Add a unit test that sets ssh->isKeying |= WOLFSSH_SELF_IS_KEYING and then calls DoNewKeys, asserting it returns WS_INVALID_STATE_E for DoNewKeys.
  • Add a test that opens one session channel successfully, then attempts to open a second session channel and asserts it receives OPEN_ADMINISTRATIVELY_PROHIBITED failure for DoChannelOpen
  • Add a regression test that calls DoKexInit and then injects a second SSH_MSG_KEXINIT payload, asserting that the result is WS_INVALID_STATE_E.

Addressed by f_2876, f_ 2877 and f_2878.

@yosuke-wolfssl yosuke-wolfssl self-assigned this May 25, 2026
Copilot AI review requested due to automatic review settings May 25, 2026 02:02
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

This PR adds regression coverage for key-exchange state guards and session-channel rejection behavior in the wolfSSH test suite.

Changes:

  • Adds parsing helpers for channel-open failure responses.
  • Adds a regression test ensuring a second session channel is rejected with OPEN_ADMINISTRATIVELY_PROHIBITED.
  • Adds tests for DoNewKeys and DoKexInit invalid keying-state handling.

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

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #990

No scan targets match the changed files in this PR. Review skipped.

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