Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: net/quic/test_tools/crypto_test_utils.cc

Issue 2227553003: Use the CHLO packet size, not message size when determining how large a REJ can be. Protected by --… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129101660
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_flags.cc ('k') | net/quic/test_tools/crypto_test_utils_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/crypto_test_utils.cc
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index f285e254e9f568f20144a01b0dfb47cdb5b8a1c6..c451aa6274714a89dcbec00f247d9c18a09dd9e8 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -302,7 +302,8 @@ class FullChloGenerator : public ValidateClientHelloResultCallback {
client_addr_, QuicSupportedVersions().front(), QuicSupportedVersions(),
/*use_stateless_rejects=*/true, /*server_designated_connection_id=*/0,
clock_, QuicRandom::GetInstance(), compressed_certs_cache_, &params,
- proof_, &rej, &diversification_nonce, &error_details);
+ proof_, /*total_framing_overhead=*/50, kDefaultMaxPacketSize, &rej,
+ &diversification_nonce, &error_details);
// Verify output is a REJ or SREJ.
EXPECT_THAT(rej.tag(),
testing::AnyOf(testing::Eq(kSREJ), testing::Eq(kREJ)));
@@ -883,6 +884,8 @@ void CryptoTestUtils::MovePackets(PacketSavingConnection* source_conn,
StringPiece(stream_frame->data_buffer, stream_frame->data_length)));
ASSERT_FALSE(crypto_visitor.error());
}
+ QuicConnectionPeer::SetCurrentPacket(
+ dest_conn, source_conn->encrypted_packets_[index]->AsStringPiece());
}
*inout_packet_index = index;
@@ -893,6 +896,7 @@ void CryptoTestUtils::MovePackets(PacketSavingConnection* source_conn,
for (const CryptoHandshakeMessage& message : crypto_visitor.messages()) {
dest_stream->OnHandshakeMessage(message);
}
+ QuicConnectionPeer::SetCurrentPacket(dest_conn, StringPiece(nullptr, 0));
}
// static
« no previous file with comments | « net/quic/core/quic_flags.cc ('k') | net/quic/test_tools/crypto_test_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698