Skip to content

Add unit tests that TLS resumption fails due to ALPN mismatch#10633

Merged
douzzer merged 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:f-4141
Jun 8, 2026
Merged

Add unit tests that TLS resumption fails due to ALPN mismatch#10633
douzzer merged 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:f-4141

Conversation

@holtrop-wolfssl

Copy link
Copy Markdown
Contributor

Description

Add unit tests that TLS resumption fails due to ALPN mismatch

This is related to #10489 and just adds a missing unit test case.

Fix F-4141

Testing

How did you test?

Checklist

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

@holtrop-wolfssl holtrop-wolfssl self-assigned this Jun 8, 2026
Copilot AI review requested due to automatic review settings June 8, 2026 13:52

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 adds regression unit tests to ensure TLS session resumption is rejected (falls back to a full handshake) when the negotiated ALPN differs from the ALPN bound to the original session/ticket, covering both TLS 1.2 session-ID resumption and TLS 1.3 ticket/PSK resumption. This aligns with the behavior introduced in PR #10489 (checking SNI/ALPN on resumption) by adding the previously missing ALPN-mismatch coverage.

Changes:

  • Add a TLS 1.2 session-ID resumption test that verifies resumption is not used when ALPN changes between the original connection and the attempted resumption.
  • Add a TLS 1.3 ticket-based resumption test that verifies resumption is not used when ALPN changes between the original connection and the attempted resumption.
  • Register the new tests in the API test declarations header so they run with the existing tests/api suite.

Reviewed changes

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

File Description
tests/api/test_tls.h Registers the two new ALPN mismatch resumption tests in the TLS API test list.
tests/api/test_tls.c Implements TLS 1.2 and TLS 1.3 resumption ALPN-mismatch regression tests using the existing memio harness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@douzzer douzzer added the Staged Staged for merge pending final test results and review label Jun 8, 2026
@douzzer
douzzer merged commit 672da2a into wolfSSL:master Jun 8, 2026
466 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Staged Staged for merge pending final test results and review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants