diff --git a/quinn-proto/src/crypto/rustls.rs b/quinn-proto/src/crypto/rustls.rs index 02d26a1c6..c8fed2544 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(), + negociated_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