Deprecate --gfe2_reloadable_flag_quic_send_tls_crypto_error_code.
PiperOrigin-RevId: 374222760
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 2caa91a..580c26a 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -121,8 +121,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_server_reverse_validate_new_path3, false)
// If ture, replace the incoming_connection_ids check with original_destination_connection_id check.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_deprecate_incoming_connection_ids, true)
-// Send correct QUIC CRYPTO_ERROR code for TLS errors instead of PROTOCOL_VIOLATION
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_send_tls_crypto_error_code, true)
// When the STMP connection option is sent by the client, timestamps in the QUIC ACK frame are sent and processed.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_send_timestamps, false)
// When true, QuicSpdySession supports draft-ietf-masque-h3-datagram.
diff --git a/quic/core/tls_client_handshaker_test.cc b/quic/core/tls_client_handshaker_test.cc
index e498acb..8365f63 100644
--- a/quic/core/tls_client_handshaker_test.cc
+++ b/quic/core/tls_client_handshaker_test.cc
@@ -279,11 +279,7 @@
TEST_P(TlsClientHandshakerTest, ConnectionClosedOnTlsError) {
// Have client send ClientHello.
stream()->CryptoConnect();
- if (GetQuicReloadableFlag(quic_send_tls_crypto_error_code)) {
- EXPECT_CALL(*connection_, CloseConnection(QUIC_HANDSHAKE_FAILED, _, _, _));
- } else {
- EXPECT_CALL(*connection_, CloseConnection(QUIC_HANDSHAKE_FAILED, _, _));
- }
+ EXPECT_CALL(*connection_, CloseConnection(QUIC_HANDSHAKE_FAILED, _, _, _));
// Send a zero-length ServerHello from server to client.
char bogus_handshake_message[] = {
@@ -621,23 +617,14 @@
.WillOnce([kTestAlpn](const std::vector<absl::string_view>& alpns) {
return std::find(alpns.cbegin(), alpns.cend(), kTestAlpn);
});
- if (GetQuicReloadableFlag(quic_send_tls_crypto_error_code)) {
- EXPECT_CALL(
- *server_connection_,
- CloseConnection(
- QUIC_HANDSHAKE_FAILED,
- static_cast<QuicIetfTransportErrorCodes>(CRYPTO_ERROR_FIRST + 120),
- "TLS handshake failure (ENCRYPTION_INITIAL) 120: "
- "no application protocol",
- _));
- } else {
- EXPECT_CALL(
- *server_connection_,
- CloseConnection(QUIC_HANDSHAKE_FAILED,
- "TLS handshake failure (ENCRYPTION_INITIAL) 120: "
- "no application protocol",
- _));
- }
+
+ EXPECT_CALL(*server_connection_,
+ CloseConnection(QUIC_HANDSHAKE_FAILED,
+ static_cast<QuicIetfTransportErrorCodes>(
+ CRYPTO_ERROR_FIRST + 120),
+ "TLS handshake failure (ENCRYPTION_INITIAL) 120: "
+ "no application protocol",
+ _));
stream()->CryptoConnect();
crypto_test_utils::AdvanceHandshake(connection_, stream(), 0,
diff --git a/quic/core/tls_handshaker.cc b/quic/core/tls_handshaker.cc
index 2051184..9ba5f3c 100644
--- a/quic/core/tls_handshaker.cc
+++ b/quic/core/tls_handshaker.cc
@@ -343,15 +343,10 @@
"TLS handshake failure (", EncryptionLevelToString(level), ") ",
static_cast<int>(desc), ": ", SSL_alert_desc_string_long(desc));
QUIC_DLOG(ERROR) << error_details;
- if (GetQuicReloadableFlag(quic_send_tls_crypto_error_code)) {
- QUIC_RELOADABLE_FLAG_COUNT(quic_send_tls_crypto_error_code);
- CloseConnection(
- TlsAlertToQuicErrorCode(desc),
- static_cast<QuicIetfTransportErrorCodes>(CRYPTO_ERROR_FIRST + desc),
- error_details);
- } else {
- CloseConnection(QUIC_HANDSHAKE_FAILED, error_details);
- }
+ CloseConnection(
+ TlsAlertToQuicErrorCode(desc),
+ static_cast<QuicIetfTransportErrorCodes>(CRYPTO_ERROR_FIRST + desc),
+ error_details);
}
} // namespace quic
diff --git a/quic/core/tls_server_handshaker_test.cc b/quic/core/tls_server_handshaker_test.cc
index 7f8c252..d67c879 100644
--- a/quic/core/tls_server_handshaker_test.cc
+++ b/quic/core/tls_server_handshaker_test.cc
@@ -562,13 +562,8 @@
}
TEST_P(TlsServerHandshakerTest, ConnectionClosedOnTlsError) {
- if (GetQuicReloadableFlag(quic_send_tls_crypto_error_code)) {
- EXPECT_CALL(*server_connection_,
- CloseConnection(QUIC_HANDSHAKE_FAILED, _, _, _));
- } else {
- EXPECT_CALL(*server_connection_,
- CloseConnection(QUIC_HANDSHAKE_FAILED, _, _));
- }
+ EXPECT_CALL(*server_connection_,
+ CloseConnection(QUIC_HANDSHAKE_FAILED, _, _, _));
// Send a zero-length ClientHello from client to server.
char bogus_handshake_message[] = {
@@ -597,23 +592,14 @@
const std::string kTestBadClientAlpn = "bad-client-alpn";
EXPECT_CALL(*client_session_, GetAlpnsToOffer())
.WillOnce(Return(std::vector<std::string>({kTestBadClientAlpn})));
- if (GetQuicReloadableFlag(quic_send_tls_crypto_error_code)) {
- EXPECT_CALL(
- *server_connection_,
- CloseConnection(
- QUIC_HANDSHAKE_FAILED,
- static_cast<QuicIetfTransportErrorCodes>(CRYPTO_ERROR_FIRST + 120),
- "TLS handshake failure (ENCRYPTION_INITIAL) 120: "
- "no application protocol",
- _));
- } else {
- EXPECT_CALL(
- *server_connection_,
- CloseConnection(QUIC_HANDSHAKE_FAILED,
- "TLS handshake failure (ENCRYPTION_INITIAL) 120: "
- "no application protocol",
- _));
- }
+
+ EXPECT_CALL(*server_connection_,
+ CloseConnection(QUIC_HANDSHAKE_FAILED,
+ static_cast<QuicIetfTransportErrorCodes>(
+ CRYPTO_ERROR_FIRST + 120),
+ "TLS handshake failure (ENCRYPTION_INITIAL) 120: "
+ "no application protocol",
+ _));
AdvanceHandshakeWithFakeClient();