gfe-relnote: Expose properties of TLS connection in quic::CryptoNegotiatedParameters. Protected by quic_supports_tls_handshake.

These fields are needed in chromium for QuicChromiumClientSession::GetSSLInfo.

PiperOrigin-RevId: 273780806
Change-Id: I4e93da07cae8c613c8f24bee1824dd14ca7199e6
diff --git a/quic/core/tls_client_handshaker.cc b/quic/core/tls_client_handshaker.cc
index 88fea66..674cf2c 100644
--- a/quic/core/tls_client_handshaker.cc
+++ b/quic/core/tls_client_handshaker.cc
@@ -328,6 +328,16 @@
   handshake_confirmed_ = true;
   session()->OnCryptoHandshakeEvent(QuicSession::ENCRYPTION_ESTABLISHED);
   session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED);
+
+  // Fill crypto_negotiated_params_:
+  const SSL_CIPHER* cipher = SSL_get_current_cipher(ssl());
+  if (cipher) {
+    crypto_negotiated_params_->cipher_suite = SSL_CIPHER_get_value(cipher);
+  }
+  crypto_negotiated_params_->key_exchange_group = SSL_get_curve_id(ssl());
+  crypto_negotiated_params_->peer_signature_algorithm =
+      SSL_get_peer_signature_algorithm(ssl());
+
   session()->connection()->OnHandshakeComplete();
 }