Skip to content

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

Merged
djc merged 1 commit into
rustls:mainfrom
jbr:fix-midhandshake-sendalert-short-write-buffer
Mar 7, 2024
Merged

djc merged 1 commit into
rustls:mainfrom
jbr:fix-midhandshake-sendalert-short-write-buffer

Conversation

@jbr

@jbr jbr commented Mar 6, 2024

Copy link
Copy Markdown
Contributor

#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

quininer

This comment was marked as duplicate.

@quininer quininer left a comment

Copy link
Copy Markdown
Member

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