Skip to content

Conversation

@ejohnstown
Copy link
Contributor

  1. Improved the checking the appropriateness of messages depending on the state.
  2. Added explicit checking for specific messages when appropriate.
  3. Added a regression test that checks for specific failure cases.

ejohnstown and others added 6 commits December 9, 2025 09:36
1. Add macro for logging an expected message.
2. Add an expected message ID to the HandshakeInfo.
3. Add a message ID for "none (0)".
4. Add a check in IsMessageAllowedClient() for the expected message ID.
   Clear it if successful.
5. The KEXDH messages sent to the server have expected responses. Set
   them if sending the message is successful.
6. Add the set of message ID ranges and macros for testing if a message
   ID is in a specific range.
7. Add flags for having sent the kexinit message and received it. Tweak
   the checks for isKeying and these flags.
8. IsMessageAllowedClient() to check for appropriate messages at the
   appropriate time during the connect.
1. Updated the checking for the server to be more like the client's
   checking.
1. Exclude the file regress.c from the Zephyr testing sample. The test
   is covered in many other environments already. The test needs some
   retooling to fit in with the Zephyr build, as it is a standalone
   application with a main() function and it depends on a testing build
   of libwolfssh.
2. Whitespace.
@ejohnstown ejohnstown changed the title Client Out Of Order Messaging Checking Out Of Order Messaging Checking Dec 9, 2025
LinuxJedi
LinuxJedi previously approved these changes Dec 10, 2025
1. Always set the expected message right before sending. If the send
   fails, it is either because the socket is closing, or it is wanting
   to block. If it is wanting to block, we still want to check the next
   message as expected.
@ejohnstown ejohnstown assigned wolfSSL-Bot and unassigned ejohnstown Dec 11, 2025
Copy link
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

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

make check passed with -DWOLFSSH_TEST_INTERNAL under sanitizers on both libwolfssl and wolfssh.

note, needed --enable-opensslextra on libwolfssl (for public FreeDecodedCert()) and -Wno-stringop-truncation on wolfssh for "examples/client/client.c:575:13: error: ‘strncpy’ specified bound 108 equals destination size", both unrelated to this PR.

@douzzer douzzer merged commit 6e97752 into wolfSSL:master Dec 15, 2025
99 of 100 checks passed
@ejohnstown ejohnstown deleted the vvv branch December 15, 2025 16:43
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.

5 participants