Skip to content

sanity checks on message types during rekey #793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JacobBarthelmeh
Copy link
Contributor

ZD18338

@JacobBarthelmeh JacobBarthelmeh self-assigned this Mar 27, 2025
@JacobBarthelmeh JacobBarthelmeh requested a review from Copilot March 31, 2025 16:09
Copy link

@Copilot 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.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (2)
  • src/internal.c: Language not supported
  • wolfssh/internal.h: Language not supported

@JacobBarthelmeh
Copy link
Contributor Author

Retest this please Jenkins

@JacobBarthelmeh JacobBarthelmeh requested a review from Copilot May 15, 2025 17:40
Copy link

@Copilot 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 sanity checks on message types during rekey operations by introducing new macros and updating error handling logic across various modules. Key changes include:

  • Addition of WS_MSG_SEND and WS_MSG_RECV macros in wolfssh/internal.h.
  • Refactored error handling logic in several functions (e.g., replacing explicit WS_WANT_READ/WS_WANT_WRITE checks with NoticeError calls) and updated rekeying condition handling.
  • Updates in helper functions and example applications to incorporate the new rekeying checks.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wolfssh/internal.h Added new macros WS_MSG_SEND and WS_MSG_RECV with an accompanying comment.
src/wolfsftp.c Modified error handling using NoticeError, improving rekey error management.
src/ssh.c Added rekeying checks in stream read/send and channel read functions.
src/internal.c Updated IsMessageAllowed signature to accept a new state parameter and added keying checks.
examples/sftpclient/sftpclient.c Incorporated rekey state recovery logic in the autopilot command loop.
examples/client/client.c Adjusted rekeying error handling in input and peer reading functions.

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.

1 participant