From ee737de709173dceae67398f756896613727df82 Mon Sep 17 00:00:00 2001 From: stormshield-gt <143998166+stormshield-gt@users.noreply.github.com.> Date: Mon, 28 Oct 2024 08:48:10 +0100 Subject: [PATCH] crypto: expose negociated_key_exchange_group in the handshake data --- quinn-proto/src/crypto/rustls.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/quinn-proto/src/crypto/rustls.rs b/quinn-proto/src/crypto/rustls.rs index 02d26a1c60..53f5fc6f10 100644 --- a/quinn-proto/src/crypto/rustls.rs +++ b/quinn-proto/src/crypto/rustls.rs @@ -11,7 +11,7 @@ use rustls::{ client::danger::ServerCertVerifier, pki_types::{CertificateDer, PrivateKeyDer, ServerName}, quic::{Connection, HeaderProtectionKey, KeyChange, PacketKey, Secrets, Suite, Version}, - CipherSuite, + CipherSuite, NamedGroup, }; use crate::{ @@ -69,6 +69,11 @@ impl crypto::Session for TlsSession { .negotiated_cipher_suite() .expect("cipher is negotiated") .suite(), + negotiated_key_exchange_group: self + .inner + .negotiated_key_exchange_group() + .expect("key exchange group is negociated") + .name(), })) } @@ -263,6 +268,8 @@ pub struct HandshakeData { pub server_name: Option, /// The ciphersuite negotiated with the peer pub negotiated_cipher_suite: CipherSuite, + /// The key exchange group negotiated with the peer + pub negotiated_key_exchange_group: NamedGroup, } /// A QUIC-compatible TLS client configuration