gfe-relnote: Stop using SetDefaultEncryptionLevel in TLS handshake. Instead, use OnOneRttKeysAvailable. Refactor only, no functional change expected, not protected.
PiperOrigin-RevId: 301928754
Change-Id: I8751cb610f1454fc2d61646c50a1fbed8dae926c
diff --git a/quic/core/http/quic_spdy_stream_test.cc b/quic/core/http/quic_spdy_stream_test.cc
index 707964c..eef43cd 100644
--- a/quic/core/http/quic_spdy_stream_test.cc
+++ b/quic/core/http/quic_spdy_stream_test.cc
@@ -89,7 +89,12 @@
}
EXPECT_THAT(error, IsQuicNoError());
session()->OnConfigNegotiated();
- session()->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+ if (session()->connection()->version().handshake_protocol ==
+ PROTOCOL_TLS1_3) {
+ session()->OnOneRttKeysAvailable();
+ } else {
+ session()->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+ }
session()->DiscardOldEncryptionKey(ENCRYPTION_INITIAL);
}