gfe-relnote: In QUIC, implement GetHandshakeState() in various handshakers. Not used yet, not protected.
GetHandshakeState() will be used to retrieve current handshake state, and handshaker is the only source of this information. But caller can choose to latch handshake state for performance purpose.
PiperOrigin-RevId: 290142490
Change-Id: I51c33c9ebcbb1ab13eddc0d86197991167642461
diff --git a/quic/core/quic_crypto_client_handshaker.cc b/quic/core/quic_crypto_client_handshaker.cc
index 9b6b38d..4d8953a 100644
--- a/quic/core/quic_crypto_client_handshaker.cc
+++ b/quic/core/quic_crypto_client_handshaker.cc
@@ -149,6 +149,10 @@
return QuicCryptoHandshaker::crypto_message_parser();
}
+HandshakeState QuicCryptoClientHandshaker::GetHandshakeState() const {
+ return one_rtt_keys_available() ? HANDSHAKE_COMPLETE : HANDSHAKE_START;
+}
+
size_t QuicCryptoClientHandshaker::BufferSizeLimitForLevel(
EncryptionLevel level) const {
return QuicCryptoHandshaker::BufferSizeLimitForLevel(level);