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 authored and Ralith committed Oct 25, 2024
1 parent bb68125 commit a5d9bd1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 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,8 @@ 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 a5d9bd1

Please # to comment.