| Index: net/quic/core/quic_crypto_server_stream_test.cc
|
| diff --git a/net/quic/core/quic_crypto_server_stream_test.cc b/net/quic/core/quic_crypto_server_stream_test.cc
|
| index b5ed5bf53f863aa7b237673d39daf2ef00369912..f208779e654d2b7a30f7a7c9a820e99b27012048 100644
|
| --- a/net/quic/core/quic_crypto_server_stream_test.cc
|
| +++ b/net/quic/core/quic_crypto_server_stream_test.cc
|
| @@ -71,22 +71,7 @@ class QuicCryptoServerStreamTest : public ::testing::TestWithParam<bool> {
|
| server_crypto_config_.set_strike_register_no_startup_period();
|
| }
|
|
|
| - void Initialize() {
|
| - InitializeServer();
|
| -
|
| - if (AsyncStrikeRegisterVerification()) {
|
| - QuicCryptoServerConfigPeer peer(&server_crypto_config_);
|
| - strike_register_client_ = new DelayedVerifyStrikeRegisterClient(
|
| - 10000, // strike_register_max_entries
|
| - static_cast<uint32_t>(
|
| - server_connection_->clock()->WallNow().ToUNIXSeconds()),
|
| - 60, // strike_register_window_secs
|
| - peer.GetPrimaryConfig()->orbit,
|
| - StrikeRegister::NO_STARTUP_PERIOD_NEEDED);
|
| - strike_register_client_->StartDelayingVerification();
|
| - server_crypto_config_.SetStrikeRegisterClient(strike_register_client_);
|
| - }
|
| - }
|
| + void Initialize() { InitializeServer(); }
|
|
|
| ~QuicCryptoServerStreamTest() override {
|
| // Ensure that anything that might reference |helpers_| is destroyed before
|
| @@ -140,13 +125,6 @@ class QuicCryptoServerStreamTest : public ::testing::TestWithParam<bool> {
|
| client_session_.reset(client_session);
|
| }
|
|
|
| - bool AsyncStrikeRegisterVerification() {
|
| - if (server_connection_->version() > QUIC_VERSION_32) {
|
| - return false;
|
| - }
|
| - return GetParam();
|
| - }
|
| -
|
| void ConstructHandshakeMessage() {
|
| CryptoFramer framer;
|
| message_data_.reset(framer.ConstructHandshakeMessage(message_));
|
| @@ -314,7 +292,6 @@ TEST_P(QuicCryptoServerStreamTest, ConnectedAfterStatelessHandshake) {
|
| InitializeServer();
|
|
|
| InitializeFakeClient(/* supports_stateless_rejects= */ true);
|
| -
|
| // In the stateless case, the second handshake contains a server-nonce, so the
|
| // AsyncStrikeRegisterVerification() case will still succeed (unlike a 0-RTT
|
| // handshake).
|
| @@ -365,39 +342,8 @@ TEST_P(QuicCryptoServerStreamTest, ZeroRTT) {
|
|
|
| client_stream()->CryptoConnect();
|
|
|
| - if (AsyncStrikeRegisterVerification()) {
|
| - EXPECT_FALSE(client_stream()->handshake_confirmed());
|
| - EXPECT_FALSE(server_stream()->handshake_confirmed());
|
| -
|
| - // Advance the handshake. Expect that the server will be stuck waiting for
|
| - // client nonce verification to complete.
|
| - std::pair<size_t, size_t> messages_moved =
|
| - CryptoTestUtils::AdvanceHandshake(client_connection_, client_stream(),
|
| - 0, server_connection_,
|
| - server_stream(), 0);
|
| - EXPECT_EQ(1u, messages_moved.first);
|
| - EXPECT_EQ(0u, messages_moved.second);
|
| - EXPECT_EQ(1, strike_register_client_->PendingVerifications());
|
| - EXPECT_FALSE(client_stream()->handshake_confirmed());
|
| - EXPECT_FALSE(server_stream()->handshake_confirmed());
|
| -
|
| - // The server handshake completes once the nonce verification completes.
|
| - strike_register_client_->RunPendingVerifications();
|
| - EXPECT_FALSE(client_stream()->handshake_confirmed());
|
| - EXPECT_TRUE(server_stream()->handshake_confirmed());
|
| -
|
| - messages_moved = CryptoTestUtils::AdvanceHandshake(
|
| - client_connection_, client_stream(), messages_moved.first,
|
| - server_connection_, server_stream(), messages_moved.second);
|
| - EXPECT_EQ(1u, messages_moved.first);
|
| - EXPECT_EQ(1u, messages_moved.second);
|
| - EXPECT_TRUE(client_stream()->handshake_confirmed());
|
| - EXPECT_TRUE(server_stream()->handshake_confirmed());
|
| - } else {
|
| - CryptoTestUtils::CommunicateHandshakeMessages(
|
| - client_connection_, client_stream(), server_connection_,
|
| - server_stream());
|
| - }
|
| + CryptoTestUtils::CommunicateHandshakeMessages(
|
| + client_connection_, client_stream(), server_connection_, server_stream());
|
|
|
| EXPECT_EQ(1, client_stream()->num_sent_client_hellos());
|
| }
|
| @@ -533,49 +479,6 @@ TEST_P(QuicCryptoServerStreamTest, NoTokenBindingWithoutClientSupport) {
|
| EXPECT_TRUE(server_stream()->handshake_confirmed());
|
| }
|
|
|
| -TEST_P(QuicCryptoServerStreamTest, CancelRPCBeforeVerificationCompletes) {
|
| - FLAGS_quic_require_handshake_confirmation_pre33 = false;
|
| - // Tests that the client can close the connection while the remote strike
|
| - // register verification RPC is still pending.
|
| -
|
| - // Set version to QUIC_VERSION_32 as QUIC_VERSION_33 and later don't support
|
| - // asynchronous strike register RPCs.
|
| - supported_versions_ = {QUIC_VERSION_32};
|
| - Initialize();
|
| - if (!AsyncStrikeRegisterVerification()) {
|
| - return;
|
| - }
|
| - InitializeFakeClient(/* supports_stateless_rejects= */ false);
|
| -
|
| - // Do a first handshake in order to prime the client config with the server's
|
| - // information.
|
| - AdvanceHandshakeWithFakeClient();
|
| -
|
| - // Now start another handshake, this time the server will attempt to verify
|
| - // the client's nonce with the strike registers.
|
| - InitializeFakeClient(/* supports_stateless_rejects= */ false);
|
| - InitializeServer();
|
| - client_stream()->CryptoConnect();
|
| - EXPECT_FALSE(client_stream()->handshake_confirmed());
|
| - EXPECT_FALSE(server_stream()->handshake_confirmed());
|
| -
|
| - // Advance the handshake. Expect that the server will be stuck waiting for
|
| - // client nonce verification to complete.
|
| - CryptoTestUtils::AdvanceHandshake(client_connection_, client_stream(), 0,
|
| - server_connection_, server_stream(), 0);
|
| - EXPECT_EQ(1, strike_register_client_->PendingVerifications());
|
| - EXPECT_FALSE(client_stream()->handshake_confirmed());
|
| - EXPECT_FALSE(server_stream()->handshake_confirmed());
|
| -
|
| - // While waiting for the asynchronous verification to complete, the client
|
| - // decides to close the connection.
|
| - server_session_->connection()->CloseConnection(
|
| - QUIC_NO_ERROR, "", ConnectionCloseBehavior::SILENT_CLOSE);
|
| -
|
| - // The outstanding nonce verification RPC now completes.
|
| - strike_register_client_->RunPendingVerifications();
|
| -}
|
| -
|
| class FailingProofSource : public ProofSource {
|
| public:
|
| bool GetProof(const IPAddress& server_ip,
|
|
|