diff --git a/quinn-proto/src/crypto/rustls.rs b/quinn-proto/src/crypto/rustls.rs index b84151811..03769a244 100644 --- a/quinn-proto/src/crypto/rustls.rs +++ b/quinn-proto/src/crypto/rustls.rs @@ -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(), })) } @@ -256,6 +261,9 @@ pub struct HandshakeData { /// /// Always `None` for outgoing connections pub server_name: Option, + + /// The ciphersuite negotiated with the peer. + pub negotiated_cipher_suite: CipherSuite, } /// A QUIC-compatible TLS client configuration