Skip to content

Clear up QUIC previous read encryption level(s) in wolfSSL_quic_clear() - #11196

Merged
philljj merged 1 commit into
wolfSSL:masterfrom
gasbytes:quic-clear-fix
Aug 20, 2026
Merged

Clear up QUIC previous read encryption level(s) in wolfSSL_quic_clear()#11196
philljj merged 1 commit into
wolfSSL:masterfrom
gasbytes:quic-clear-fix

Conversation

@gasbytes

Copy link
Copy Markdown
Contributor

Description

Reset all five encryption-level in wolfSSL_quic_clear() when cleaning up a TLS connection

Testing

Added a regression test test_quic_clear_reuse.

Checklist

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

@gasbytes gasbytes self-assigned this Aug 18, 2026
Copilot AI lite review requested due to automatic review settings August 18, 2026 17:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes QUIC/TLS connection reuse by ensuring wolfSSL_clear() fully resets QUIC encryption-level tracking state via wolfSSL_quic_clear(), preventing stale read/write level state from incorrectly affecting subsequent connections on the same WOLFSSL*.

Changes:

  • Reset the remaining QUIC encryption-level fields (enc_level_{read,read_next,write_next}) in wolfSSL_quic_clear(), bringing QUIC state back to the same baseline as a fresh QUIC WOLFSSL*.
  • Add a regression test that performs a full QUIC handshake, calls wolfSSL_clear(), and verifies the client’s QUIC read/write levels return to wolfssl_encryption_initial and that Initial-level data is accepted again.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/quic.c Resets all QUIC encryption-level fields during wolfSSL_quic_clear() so reuse via wolfSSL_clear() starts from Initial state.
tests/quic.c Adds test_quic_clear_reuse to validate QUIC state reset behavior after wolfSSL_clear().

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@gasbytes
gasbytes marked this pull request as ready for review August 19, 2026 10:25
@github-actions

Copy link
Copy Markdown

retest this please

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11196

Scan targets checked: wolfssl-bugs, wolfssl-src

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread tests/quic.c
Comment thread tests/quic.c Outdated

@philljj philljj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, just small suggested test change.

Comment thread tests/quic.c
Comment thread tests/quic.c Outdated
Comment thread tests/quic.c
@philljj philljj assigned gasbytes and unassigned wolfSSL-Bot Aug 19, 2026
@gasbytes

Copy link
Copy Markdown
Contributor Author

Jenkins retest this please.

@gasbytes
gasbytes requested a review from philljj August 20, 2026 16:43
@gasbytes gasbytes assigned philljj and unassigned gasbytes Aug 20, 2026
@philljj
philljj merged commit 79aca0b into wolfSSL:master Aug 20, 2026
383 of 385 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.

5 participants