Skip to content

fix: incorrect group reported for TLS 1.2 session resumption#5673

Merged
jmayclin merged 11 commits intoaws:mainfrom
jmayclin:2025-12-15-group-getter-issue
Dec 31, 2025
Merged

fix: incorrect group reported for TLS 1.2 session resumption#5673
jmayclin merged 11 commits intoaws:mainfrom
jmayclin:2025-12-15-group-getter-issue

Conversation

@jmayclin
Copy link
Copy Markdown
Contributor

@jmayclin jmayclin commented Dec 15, 2025

Goal

Fix #5672

Why

Currently, an incorrect group/curve is reported during TLS 1.2 session resumption. No DHE exchange takes places, so the group should be None, but instead the default curve was being reported.

How

I just added an additional check to the curve getter.

I also added an integration test confirming that we have the correct behavior.

release summary: Fixed an issue where selected_key_exchange_group for a resumed TLS 1.2 connection would incorrectly report secp256r1.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Dec 15, 2025
@jmayclin jmayclin changed the title add test case for TLS 1.2 resumption group bug test: add test case for TLS 1.2 resumption group bug Dec 15, 2025
@jmayclin jmayclin changed the title test: add test case for TLS 1.2 resumption group bug fix: incorrect group reported for TLS 1.2 session resumption Dec 16, 2025
* formatting
@jmayclin jmayclin marked this pull request as ready for review December 16, 2025 01:45
Copy link
Copy Markdown
Contributor

@maddeleine maddeleine left a comment

Choose a reason for hiding this comment

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

Hmm okay I'm completely confused. Aren't you supposed to be fixing the s2n_connection_get_key_exchange_group? You seem to be fixing the deprecated API s2n_connection_get_curve. But how could your tests be passing unless you did fix the problem 🤔...
Sorry, crashed out there for a minute. s2n_connection_get_key_exchange_group calls s2n_connection_get_curve, which means you have to fix the latter to fix the former. I need to not do reviews before I have coffee 😪

* rename intermediate variables
* I wan't correctly handling expected errors
* merge issue
* this one was gated behind a feature
Co-authored-by: Carol Yeh <69044490+CarolYeh910@users.noreply.github.com>
@jmayclin jmayclin enabled auto-merge December 31, 2025 00:28
@jmayclin jmayclin requested a review from CarolYeh910 December 31, 2025 00:28
@jmayclin jmayclin added this pull request to the merge queue Dec 31, 2025
Merged via the queue into aws:main with commit 6b5b32a Dec 31, 2025
54 checks passed
@jmayclin jmayclin deleted the 2025-12-15-group-getter-issue branch December 31, 2025 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: incorrect key_exchange_group information

4 participants