Skip to content

feat(rustls): expose negotiated key exchange group to callbacks - #1103

Open
pederbe wants to merge 1 commit into
cloudflare:mainfrom
pederbe:contrib/955-negotiated-kx-group
Open

pederbe wants to merge 1 commit into
cloudflare:mainfrom
pederbe:contrib/955-negotiated-kx-group

Conversation

@pederbe

@pederbe pederbe commented Nov 3, 2026

Copy link
Copy Markdown

Applications cannot currently read the negotiated key exchange group from rustls post-handshake callbacks. Add TlsRef::negotiated_key_exchange_group() returning Option<NamedGroup> so a downstream TlsAccept callback can retain it in an application-defined SslDigest extension.

This preserves the application's ownership of the extension and numeric identifiers for groups without a known name. The accessor reports None when no key exchange occurred, including resumed TLS 1.2 handshakes. The documentation shows how to capture and retrieve the metadata.

Regression coverage negotiates X25519 and secp256r1 with TLS 1.2 and 1.3, checks per-connection digest storage, and verifies the absent group on TLS 1.2 resumption.

Addresses #955.

@pederbe
pederbe marked this pull request as ready for review November 3, 2026 12:00
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T12:02:22.651364Z 4611a56 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant