events: emit on_key_exchange_group event#2566
Merged
WesleyRosenblum merged 2 commits intomainfrom Mar 26, 2025
Merged
Conversation
camshaft
approved these changes
Mar 26, 2025
dougch
pushed a commit
that referenced
this pull request
May 19, 2025
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.
Release Summary:
on_key_exchange_groupevent to indicate the key exchange group negotiated during the TLS handshake. The event also indicates if a key encapsulation mechanism was part of the group by settingcontains_kemto true.Resolved issues:
resolves #2523
Description of changes:
This change uses the new s2n-tls API added in aws/s2n-tls#5209 to emit a new event
on_key_exchange_groupto indicate the key exchange group negotiated during the TLS handshake. The event also indicates if a key encapsulation mechanism was part of the group by settingcontains_kemto true.Call-outs:
rustls does not have a built in way to indicate if the named group contains a KEM, so I had to parse the string for
kem. I can follow up with an issue or PR to rustls to add this functionalityI updated
#[cfg(s2n_quic_enable_pq_tls)] static DEFAULT_POLICY: &s2n_tls::security::Policyas the existingTESTING_PQpolicy is deprecated and no longer builds.rustls uses capitalization for named groups that differs from the IANA specification (X25519 for example), so I'm ignoring capilization in the
PartialEqimpl:Testing:
Updated existing tests
Observed example code emitting the event:
0.034798792s s2n_quic:client:conn: key_exchange_group: chosen_group_name="X25519MLKEM768" contains_kem=true id=09.003157875s s2n_quic:server:conn: key_exchange_group: chosen_group_name="X25519MLKEM768" contains_kem=true id=0By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.