check that we are resuming in write_early_data + minor fixes#9601
Merged
dgarske merged 4 commits intowolfSSL:masterfrom Jan 8, 2026
Merged
check that we are resuming in write_early_data + minor fixes#9601dgarske merged 4 commits intowolfSSL:masterfrom
dgarske merged 4 commits intowolfSSL:masterfrom
Conversation
Avoid resetting ssl->earlyData in wolfSSL_write_early_data when the function is re-entered due to WC_PENDING_E, WANT_WRITE, or WANT_READ.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the early data handling in TLS 1.3 by adding validation checks and refactoring redundant code. The changes ensure that early data can only be sent when session resumption or PSK is available, and improve the state management when wolfSSL_write_early_data is invoked multiple times.
Key Changes:
- Introduces
EarlyDataPossible()helper function to validate early data prerequisites - Adds validation in
wolfSSL_write_early_datato verify resumption/PSK before allowing early data - Fixes state management to avoid re-setting
ssl->earlyDataon function re-entry
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
julek-wolfssl
requested changes
Jan 6, 2026
Contributor
Author
|
retest this please |
julek-wolfssl
approved these changes
Jan 8, 2026
dgarske
approved these changes
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
wolfSSL_write_early_data, error otherwisessl->earlyData == expecting_early_dataonly on the firstwolfSSL_write_early_datainvocation