Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes a TLS 1.2 encrypt-then-MAC (ETM) negotiation bug when the server initially believes a session is being resumed but the resumption lookup fails, ensuring ETM isn’t silently disabled.
Changes:
- Guard ETM response/disable logic in
DoClientHelloso it only runs on successful resumption (when cipher specs are populated). - Add a regression test that attempts stale session-ID resumption against a server with session-cache lookups disabled, and asserts ETM remains enabled.
- Register the new TLS test in the test suite declarations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/api/test_tls.h | Registers the new TLS 1.2 ETM failed-resumption regression test. |
| tests/api/test_tls.c | Adds a regression test covering the stale-resumption/non-resumption ETM path. |
| src/internal.c | Updates ClientHello ETM handling to defer decisions unless resumption actually succeeded. |
Comments suppressed due to low confidence (1)
src/internal.c:1
- The continuation indentation on the wrapped condition is unusually wide and hurts readability compared to typical style in this file. Consider re-wrapping to a consistent indentation level (or collapsing the condition onto one line if it fits) so future diffs are clearer.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SparkiDev
approved these changes
Apr 9, 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
Correctly handle non-resumption path for encrypt-then-mac.
Fixes zd21571
Testing
Added
test_tls12_etm_failed_resumptionChecklist