Deprecate --gfe2_reloadable_flag_quic_tls_server_use_handshake_hints. PiperOrigin-RevId: 378876713
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h index d92ddae..8b98c9b 100644 --- a/quic/core/quic_flags_list.h +++ b/quic/core/quic_flags_list.h
@@ -29,8 +29,6 @@ QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_tls_retry_handshake_on_early_data, true) // If true, TlsServerHandshaker will allow proof_source_handle_ to be closed promptly. QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_tls_close_proof_source_handle_promptly, true) -// If true, TlsServerHandshaker will use handshake hints(if present) to speed up handshakes. -QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_tls_server_use_handshake_hints, true) // If true, abort async QPACK header decompression in QuicSpdyStream::Reset() and in QuicSpdyStream::OnStreamReset(). QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_abort_qpack_on_stream_reset, true) // If true, ack frequency frame can be sent from server to client.
diff --git a/quic/core/tls_server_handshaker.cc b/quic/core/tls_server_handshaker.cc index d0257f9..c129de3 100644 --- a/quic/core/tls_server_handshaker.cc +++ b/quic/core/tls_server_handshaker.cc
@@ -814,27 +814,25 @@ absl::string_view ssl_capabilities_view; absl::optional<std::string> alps; - if (use_handshake_hints_) { - QUIC_RELOADABLE_FLAG_COUNT(quic_tls_server_use_handshake_hints); - if (CryptoUtils::GetSSLCapabilities(ssl(), &ssl_capabilities, - &ssl_capabilities_len)) { - ssl_capabilities_view = absl::string_view( - reinterpret_cast<const char*>(ssl_capabilities.get()), - ssl_capabilities_len); - } - // Enable ALPS for the session's ALPN. - SetApplicationSettingsResult alps_result = - SetApplicationSettings(AlpnForVersion(session()->version())); - if (!alps_result.success) { - return ssl_select_cert_error; - } - alps = alps_result.alps_length > 0 - ? std::string(alps_result.alps_buffer.get(), - alps_result.alps_length) - : std::string(); + if (CryptoUtils::GetSSLCapabilities(ssl(), &ssl_capabilities, + &ssl_capabilities_len)) { + ssl_capabilities_view = + absl::string_view(reinterpret_cast<const char*>(ssl_capabilities.get()), + ssl_capabilities_len); } + // Enable ALPS for the session's ALPN. + SetApplicationSettingsResult alps_result = + SetApplicationSettings(AlpnForVersion(session()->version())); + if (!alps_result.success) { + return ssl_select_cert_error; + } + alps = + alps_result.alps_length > 0 + ? std::string(alps_result.alps_buffer.get(), alps_result.alps_length) + : std::string(); + const QuicAsyncStatus status = proof_source_handle_->SelectCertificate( session()->connection()->self_address(), session()->connection()->peer_address(), ssl_capabilities_view, @@ -878,17 +876,15 @@ if (ok) { if (chain && !chain->certs.empty()) { tls_connection_.SetCertChain(chain->ToCryptoBuffers().value); - if (use_handshake_hints_) { - if (!handshake_hints.empty() && - !SSL_set_handshake_hints( - ssl(), reinterpret_cast<const uint8_t*>(handshake_hints.data()), - handshake_hints.size())) { - // If |SSL_set_handshake_hints| fails, the ssl() object will remain - // intact, it is as if we didn't call it. The handshaker will - // continue to compute signature/decrypt ticket as normal. - QUIC_CODE_COUNT(quic_tls_server_set_handshake_hints_failed); - QUIC_DVLOG(1) << "SSL_set_handshake_hints failed"; - } + if (!handshake_hints.empty() && + !SSL_set_handshake_hints( + ssl(), reinterpret_cast<const uint8_t*>(handshake_hints.data()), + handshake_hints.size())) { + // If |SSL_set_handshake_hints| fails, the ssl() object will remain + // intact, it is as if we didn't call it. The handshaker will + // continue to compute signature/decrypt ticket as normal. + QUIC_CODE_COUNT(quic_tls_server_set_handshake_hints_failed); + QUIC_DVLOG(1) << "SSL_set_handshake_hints failed"; } select_cert_status_ = QUIC_SUCCESS; } else { @@ -986,13 +982,6 @@ return SSL_TLSEXT_ERR_NOACK; } - if (!use_handshake_hints_) { - // Enable ALPS for the selected ALPN protocol. - if (!SetApplicationSettings(*selected_alpn).success) { - return SSL_TLSEXT_ERR_NOACK; - } - } - session()->OnAlpnSelected(*selected_alpn); valid_alpn_received_ = true; *out_len = selected_alpn->size();
diff --git a/quic/core/tls_server_handshaker.h b/quic/core/tls_server_handshaker.h index b5fff82..6d216df 100644 --- a/quic/core/tls_server_handshaker.h +++ b/quic/core/tls_server_handshaker.h
@@ -339,8 +339,6 @@ crypto_negotiated_params_; TlsServerConnection tls_connection_; const QuicCryptoServerConfig* crypto_config_; // Unowned. - const bool use_handshake_hints_ = - GetQuicReloadableFlag(quic_tls_server_use_handshake_hints); }; } // namespace quic