Add support for draft-27
This CL updates v99 from draft 26 to draft 27. The main change is a rewrite of how transport parameters are read and written. This CL also replaces quic_enable_version_draft_25_v2 with quic_enable_version_draft_25_v3 to ensure that we only enable draft25 with the new code.
gfe-relnote: refactor transport parameter encoding code, protected by disabled flag quic_enable_version_draft_25_v3
PiperOrigin-RevId: 298427763
Change-Id: I2417b25584d914d38a55155ffddbac6e073fcd80
diff --git a/quic/core/tls_server_handshaker.cc b/quic/core/tls_server_handshaker.cc
index bb8a821..6831e69 100644
--- a/quic/core/tls_server_handshaker.cc
+++ b/quic/core/tls_server_handshaker.cc
@@ -225,11 +225,18 @@
size_t params_bytes_len;
SSL_get_peer_quic_transport_params(ssl(), &client_params_bytes,
¶ms_bytes_len);
- if (params_bytes_len == 0 ||
- !ParseTransportParameters(session()->connection()->version(),
+ if (params_bytes_len == 0) {
+ *error_details = "Client's transport parameters are missing";
+ return false;
+ }
+ std::string parse_error_details;
+ if (!ParseTransportParameters(session()->connection()->version(),
Perspective::IS_CLIENT, client_params_bytes,
- params_bytes_len, &client_params)) {
- *error_details = "Unable to parse Transport Parameters";
+ params_bytes_len, &client_params,
+ &parse_error_details)) {
+ DCHECK(!parse_error_details.empty());
+ *error_details =
+ "Unable to parse client's transport parameters: " + parse_error_details;
return false;
}