gfe-relnote: Use HandshakerDelegateInterface in QUIC handshakers. Abstract keys installation, keys discarding, default encryption level change and mark handshake complete to HandshakerDelegateInterface. Protected by gfe2_reloadable_flag_quic_use_handshaker_delegate.
The final goal is remove session pointer from handshakers.
PiperOrigin-RevId: 282826263
Change-Id: I9b379ccfcebd174df1850f7df45069d388460173
diff --git a/quic/core/tls_handshaker_test.cc b/quic/core/tls_handshaker_test.cc
index e9dbd0d..a86b521 100644
--- a/quic/core/tls_handshaker_test.cc
+++ b/quic/core/tls_handshaker_test.cc
@@ -177,6 +177,8 @@
pending_writes_.push_back(std::make_pair(std::string(data), level));
}
+ void OnPacketDecrypted(EncryptionLevel /*level*/) override {}
+
const std::vector<std::pair<std::string, EncryptionLevel>>& pending_writes() {
return pending_writes_;
}
@@ -269,6 +271,10 @@
handshaker_->CancelOutstandingCallbacks();
}
+ void OnPacketDecrypted(EncryptionLevel level) override {
+ handshaker_->OnPacketDecrypted(level);
+ }
+
TlsHandshaker* handshaker() const override { return handshaker_.get(); }
FakeProofSource* GetFakeProofSource() const { return proof_source_; }
@@ -372,12 +378,6 @@
EXPECT_CALL(*client_conn_, CloseConnection(_, _, _)).Times(0);
EXPECT_CALL(*server_conn_, CloseConnection(_, _, _)).Times(0);
- EXPECT_CALL(client_session_,
- OnCryptoHandshakeEvent(QuicSession::ENCRYPTION_ESTABLISHED));
- EXPECT_CALL(client_session_,
- OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED));
- EXPECT_CALL(server_session_,
- OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED));
EXPECT_CALL(client_stream_->proof_handler(), OnProofVerifyDetailsAvailable);
client_stream_->CryptoConnect();
ExchangeHandshakeMessages(client_stream_, server_stream_);
@@ -558,12 +558,6 @@
TEST_F(TlsHandshakerTest, CustomALPNNegotiation) {
EXPECT_CALL(*client_conn_, CloseConnection(_, _, _)).Times(0);
EXPECT_CALL(*server_conn_, CloseConnection(_, _, _)).Times(0);
- EXPECT_CALL(client_session_,
- OnCryptoHandshakeEvent(QuicSession::ENCRYPTION_ESTABLISHED));
- EXPECT_CALL(client_session_,
- OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED));
- EXPECT_CALL(server_session_,
- OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED));
const std::string kTestAlpn = "A Custom ALPN Value";
const std::vector<std::string> kTestAlpns(