Skip to content

Commit

Permalink
crypto: expose negotiated_cipher_suite in the hadshake data
Browse files Browse the repository at this point in the history
  • Loading branch information
BiagioFesta committed Oct 4, 2024
1 parent 08ee9ee commit bc0389e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions quinn-proto/src/crypto/rustls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ impl crypto::Session for TlsSession {
Connection::Client(_) => None,
Connection::Server(ref session) => session.server_name().map(|x| x.into()),
},
negotiated_cipher_suite: self
.inner
.negotiated_cipher_suite()
.expect("cipher is negotiated")
.suite(),
}))
}

Expand Down Expand Up @@ -256,6 +261,9 @@ pub struct HandshakeData {
///
/// Always `None` for outgoing connections
pub server_name: Option<String>,

/// The ciphersuite negotiated with the peer.
pub negotiated_cipher_suite: CipherSuite,
}

/// A QUIC-compatible TLS client configuration
Expand Down

0 comments on commit bc0389e

Please sign in to comment.