Skip to content

Fix ETM on resumption#10167

Merged
SparkiDev merged 4 commits intowolfSSL:masterfrom
embhorn:zd21571
Apr 9, 2026
Merged

Fix ETM on resumption#10167
SparkiDev merged 4 commits intowolfSSL:masterfrom
embhorn:zd21571

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Apr 8, 2026

Description

Correctly handle non-resumption path for encrypt-then-mac.

Fixes zd21571

Testing

Added test_tls12_etm_failed_resumption

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@embhorn embhorn self-assigned this Apr 8, 2026
@embhorn embhorn added the Not For This Release Not for release 5.9.1 label Apr 8, 2026
Copilot AI review requested due to automatic review settings April 8, 2026 20:10
Copy link
Copy Markdown
Contributor

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

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 DoClientHello so 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.

Comment thread tests/api/test_tls.c Outdated
Comment thread tests/api/test_tls.c
Copilot AI review requested due to automatic review settings April 9, 2026 15:14
Copy link
Copy Markdown
Contributor

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

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.

Comment thread tests/api/test_tls.c
Comment thread tests/api/test_tls.c
Comment thread tests/api/test_tls.c
Comment thread tests/api/test_tls.c
Comment thread tests/api/test_tls.c
Comment thread tests/api/test_tls.c
Comment thread tests/api/test_tls.c
@embhorn embhorn assigned wolfSSL-Bot and unassigned embhorn Apr 9, 2026
@embhorn embhorn removed the Not For This Release Not for release 5.9.1 label Apr 9, 2026
@SparkiDev SparkiDev merged commit abfff1e into wolfSSL:master Apr 9, 2026
497 of 498 checks passed
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.

4 participants