Add `quic::HandshakerDelegateInterface::OnTlsHandshakeConfirmed` and use it to increment the hyperloop's "handshake success" stats. PiperOrigin-RevId: 583041100
diff --git a/quiche/quic/core/handshaker_delegate_interface.h b/quiche/quic/core/handshaker_delegate_interface.h index f10ba4a..a1c1a44 100644 --- a/quiche/quic/core/handshaker_delegate_interface.h +++ b/quiche/quic/core/handshaker_delegate_interface.h
@@ -37,6 +37,10 @@ // handshake. virtual void OnTlsHandshakeComplete() = 0; + // Called on the client side when handshake state change to + // HANDSHAKE_CONFIRMED. Only used in TLS handshake. + virtual void OnTlsHandshakeConfirmed() = 0; + // Called to discard old decryption keys to stop processing packets of // encryption |level|. virtual void DiscardOldDecryptionKey(EncryptionLevel level) = 0;
diff --git a/quiche/quic/core/quic_session.h b/quiche/quic/core/quic_session.h index dd757b7..db16a19 100644 --- a/quiche/quic/core/quic_session.h +++ b/quiche/quic/core/quic_session.h
@@ -317,6 +317,7 @@ EncryptionLevel level, std::unique_ptr<QuicEncrypter> encrypter) override; void SetDefaultEncryptionLevel(EncryptionLevel level) override; void OnTlsHandshakeComplete() override; + void OnTlsHandshakeConfirmed() override {} void DiscardOldDecryptionKey(EncryptionLevel level) override; void DiscardOldEncryptionKey(EncryptionLevel level) override; void NeuterUnencryptedData() override;
diff --git a/quiche/quic/core/tls_client_handshaker.cc b/quiche/quic/core/tls_client_handshaker.cc index 0a9a7d2..244fbbb 100644 --- a/quiche/quic/core/tls_client_handshaker.cc +++ b/quiche/quic/core/tls_client_handshaker.cc
@@ -478,6 +478,7 @@ return; } state_ = HANDSHAKE_CONFIRMED; + handshaker_delegate()->OnTlsHandshakeConfirmed(); handshaker_delegate()->DiscardOldEncryptionKey(ENCRYPTION_HANDSHAKE); handshaker_delegate()->DiscardOldDecryptionKey(ENCRYPTION_HANDSHAKE); }