ssl: expose the negotiated TLS-1.3 group in connection_information - #11440
Open
jbevemyr wants to merge 1 commit into
Open
ssl: expose the negotiated TLS-1.3 group in connection_information#11440jbevemyr wants to merge 1 commit into
jbevemyr wants to merge 1 commit into
Conversation
Contributor
CT Test ResultsTests are running... https://github.com/erlang/otp/actions/runs/31312512455 Results for commit cfbfe56 To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
jbevemyr
force-pushed
the
expose-selected-group
branch
from
August 9, 2026 19:33
cfbfe56 to
efe83e1
Compare
The named group of the TLS-1.3 key exchange is negotiated via the supported_groups and key_share extensions and is already kept in the connection state (session.ecc), but connection_information/1,2 never exposed it: the existing ecc item only covers pre-TLS-1.3 named-curve cipher suites. With the arrival of post-quantum hybrid groups (X25519MLKEM768 and friends) the negotiated group has become operationally interesting: an application or an operator auditing a fleet wants to know whether a given connection actually negotiated a quantum-safe key exchange or fell back to a classical group. Today that is only visible by packet inspection or debug-level handshake logging. Add a selected_group item, returned for TLS-1.3 connections on both the client and the server side.
jbevemyr
force-pushed
the
expose-selected-group
branch
from
August 9, 2026 19:35
efe83e1 to
6a19d6a
Compare
Author
|
Verification done on this branch, built from source on x86_64 Linux:
|
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.
The named group of the TLS-1.3 key exchange is negotiated via the supported_groups and key_share extensions and is already kept in the connection state (
session.ecc), butconnection_information/1,2never exposed it: the existingeccitem only covers pre-TLS-1.3 named-curve cipher suites.With the arrival of post-quantum hybrid groups (
x25519mlkem768and friends, OTP 28) the negotiated group has become operationally interesting: an application or an operator auditing a fleet wants to know whether a given connection actually negotiated a quantum-safe key exchange or fell back to a classical group. Today that is only visible through packet inspection or debug-level handshake logging (and for hybrid groups,openssl s_clientprints a "Negotiated TLS1.3 group" line for the same reason).This adds a
selected_groupitem, returned for TLS-1.3 connections on both the client and the server side:{ok, [{selected_group, x25519mlkem768}]} = ssl:connection_information(Socket, [selected_group]).The item is absent for pre-TLS-1.3 connections (where
eccretains its existing semantics), and absent when no group was negotiated. Functionally verified against both a hybrid-first and a classical-only peer;ssl_api_SUITE:connection_informationextended to assert the item on both sides for TLS-1.3 and its absence otherwise.