Skip to content

Commit

Permalink
crypto: expose negociated_key_exchange_group in the handshake data
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-gt committed Oct 28, 2024
1 parent a5d9bd1 commit 6051c30
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion quinn-proto/src/crypto/rustls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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(),
}))
}

Expand Down Expand Up @@ -263,6 +268,8 @@ pub struct HandshakeData {
pub server_name: Option<String>,
/// 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
Expand Down

0 comments on commit 6051c30

Please sign in to comment.