Deprecate --gfe2_reloadable_flag_quic_tls_restore_connection_context_in_callbacks.
PiperOrigin-RevId: 410243735
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 3ff0043..37da0e8 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -99,8 +99,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_require_handshake_confirmation, false)
// If true, reset per packet state before processing undecryptable packets.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_reset_per_packet_state_for_undecryptable_packets, true)
-// If true, restore connection context in various callbacks in TlsServerHandshaker.
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_tls_restore_connection_context_in_callbacks, true)
// If true, send PATH_RESPONSE upon receiving PATH_CHALLENGE regardless of perspective. --gfe2_reloadable_flag_quic_start_peer_migration_earlier has to be true before turn on this flag.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_send_path_response2, true)
// If true, set burst token to 2 in cwnd bootstrapping experiment.
diff --git a/quic/core/tls_server_handshaker.cc b/quic/core/tls_server_handshaker.cc
index bc0d361..d35b923 100644
--- a/quic/core/tls_server_handshaker.cc
+++ b/quic/core/tls_server_handshaker.cc
@@ -150,16 +150,13 @@
(handshaker->expected_ssl_error() == SSL_ERROR_PENDING_TICKET);
absl::optional<QuicConnectionContextSwitcher> context_switcher;
- if (handshaker->restore_connection_context_in_callbacks_) {
- QUIC_RELOADABLE_FLAG_COUNT_N(
- quic_tls_restore_connection_context_in_callbacks, 1, 3);
- if (is_async) {
- context_switcher.emplace(handshaker->connection_context());
- }
- QUIC_TRACESTRING(
- absl::StrCat("TLS ticket decryption done. len(decrypted_ticket):",
- handshaker->decrypted_session_ticket_.size()));
+
+ if (is_async) {
+ context_switcher.emplace(handshaker->connection_context());
}
+ QUIC_TRACESTRING(
+ absl::StrCat("TLS ticket decryption done. len(decrypted_ticket):",
+ handshaker->decrypted_session_ticket_.size()));
// DecryptCallback::Run could be called synchronously. When that happens, we
// are currently in the middle of a call to AdvanceHandshake.
@@ -733,18 +730,14 @@
<< ", is_sync:" << is_sync
<< ", len(signature):" << signature.size();
absl::optional<QuicConnectionContextSwitcher> context_switcher;
- if (restore_connection_context_in_callbacks_) {
- QUIC_RELOADABLE_FLAG_COUNT_N(
- quic_tls_restore_connection_context_in_callbacks, 2, 3);
- if (!is_sync) {
- context_switcher.emplace(connection_context());
- }
-
- QUIC_TRACESTRING(absl::StrCat("TLS compute signature done. ok:", ok,
- ", len(signature):", signature.size()));
+ if (!is_sync) {
+ context_switcher.emplace(connection_context());
}
+ QUIC_TRACESTRING(absl::StrCat("TLS compute signature done. ok:", ok,
+ ", len(signature):", signature.size()));
+
if (ok) {
cert_verify_sig_ = std::move(signature);
proof_source_details_ = std::move(details);
@@ -1013,19 +1006,15 @@
<< ", len(ticket_encryption_key):"
<< ticket_encryption_key.size();
absl::optional<QuicConnectionContextSwitcher> context_switcher;
- if (restore_connection_context_in_callbacks_) {
- QUIC_RELOADABLE_FLAG_COUNT_N(
- quic_tls_restore_connection_context_in_callbacks, 3, 3);
-
- if (!is_sync) {
- context_switcher.emplace(connection_context());
- }
-
- QUIC_TRACESTRING(absl::StrCat(
- "TLS select certificate done: ok:", ok,
- ", len(handshake_hints):", handshake_hints.size(),
- ", len(ticket_encryption_key):", ticket_encryption_key.size()));
+ if (!is_sync) {
+ context_switcher.emplace(connection_context());
}
+
+ QUIC_TRACESTRING(absl::StrCat(
+ "TLS select certificate done: ok:", ok,
+ ", len(handshake_hints):", handshake_hints.size(),
+ ", len(ticket_encryption_key):", ticket_encryption_key.size()));
+
ticket_encryption_key_ = std::string(ticket_encryption_key);
select_cert_status_ = QUIC_FAILURE;
cert_matched_sni_ = cert_matched_sni;
diff --git a/quic/core/tls_server_handshaker.h b/quic/core/tls_server_handshaker.h
index 9a492c5..57aa652 100644
--- a/quic/core/tls_server_handshaker.h
+++ b/quic/core/tls_server_handshaker.h
@@ -325,7 +325,6 @@
QuicTime now() const { return session()->GetClock()->Now(); }
QuicConnectionContext* connection_context() {
- QUICHE_DCHECK(restore_connection_context_in_callbacks_);
return session()->connection()->context();
}
@@ -376,8 +375,6 @@
// The last received CachedNetworkParameters from a validated address token.
mutable std::unique_ptr<CachedNetworkParameters>
last_received_cached_network_params_;
- const bool restore_connection_context_in_callbacks_ =
- GetQuicReloadableFlag(quic_tls_restore_connection_context_in_callbacks);
bool cert_matched_sni_ = false;
};