gfe-relnote: In QUIC, close connection if decryption key is available before encryption key when TLS handshaker is used. Protected by disabled v99 flag.
Also route the error up to BoringSSL layer.
PiperOrigin-RevId: 294710276
Change-Id: I2af93903e76a81a0578e9791c1ccc25d35f9b5c5
diff --git a/quic/core/quic_session_test.cc b/quic/core/quic_session_test.cc
index 153c787..e374432 100644
--- a/quic/core/quic_session_test.cc
+++ b/quic/core/quic_session_test.cc
@@ -2822,6 +2822,17 @@
session_.SendRstStream(bidirectional, QUIC_STREAM_CANCELLED, 0);
}
+TEST_P(QuicSessionTestServer, DecryptionKeyAvailableBeforeEncryptionKey) {
+ if (connection_->version().handshake_protocol != PROTOCOL_TLS1_3) {
+ return;
+ }
+ ASSERT_FALSE(connection_->framer().HasEncrypterOfEncryptionLevel(
+ ENCRYPTION_HANDSHAKE));
+ EXPECT_FALSE(session_.OnNewDecryptionKeyAvailable(
+ ENCRYPTION_HANDSHAKE, /*decrypter=*/nullptr,
+ /*set_alternative_decrypter=*/false, /*latch_once_used=*/false));
+}
+
// A client test class that can be used when the automatic configuration is not
// desired.
class QuicSessionTestClientUnconfigured : public QuicSessionTestBase {