Skip to content
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

fix: correctly poll alert.write until it finishes #52

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

jbr
Copy link
Contributor

@jbr jbr commented Mar 6, 2024

#48 identified that #47 did not correctly handle the scenario in which the io has insufficient capacity for the alert, requiring multiple calls to alert.write. This PR introduces a test that exercises the alert writing behavior against a smaller duplex than the alert length. If there's a better way to construct an invalid ClientHello, please let me know. I've confirmed that the test fails without the change to handshake.rs

@jbr jbr force-pushed the fix-midhandshake-sendalert-short-write-buffer branch 2 times, most recently from 9f88483 to 580891a Compare March 6, 2024 22:58
@jbr jbr force-pushed the fix-midhandshake-sendalert-short-write-buffer branch from 580891a to 74f6afb Compare March 6, 2024 23:01
quininer

This comment was marked as duplicate.

Copy link
Member

@quininer quininer left a comment

Choose a reason for hiding this comment

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

LGTM

@djc djc requested a review from ctz March 7, 2024 08:59
@djc djc merged commit 214a2b4 into rustls:main Mar 7, 2024
6 checks passed
@cpu cpu mentioned this pull request Mar 21, 2024
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