summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_stream_factory_test.cc
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-03 13:11:48 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-03 13:11:48 +0000
commit8ba812191740bbfde777360953618d80dd3467a5 (patch)
tree8463dee728e41899878d4e0ae7af5547aff429c9 /net/quic/quic_stream_factory_test.cc
parenta5f906063cff4e0362d364345ba0c727df86dc09 (diff)
downloadchromium_src-8ba812191740bbfde777360953618d80dd3467a5.zip
chromium_src-8ba812191740bbfde777360953618d80dd3467a5.tar.gz
chromium_src-8ba812191740bbfde777360953618d80dd3467a5.tar.bz2
Land Recent QUIC Changes
Alter the serialisation format of the crypto messages. This changes the format of the crypto messages so that: * We can cope with > 65K values in order to be robust to post-quantum algorithms in the future. * Rather than encoding lengths, we encode the offset one byte past the end of the value. This allows an implementation to binary search the header without having to do all the allocation and copying the we currently do. Merge internal change: 44699015 Automated rollback of changelist 44685914. Rollback: Bugfix infinite wait Merge internal change: 44693957 QUIC: retransmit packets with the correct encryption. This change does four things: * Splits the concept of a completed handshake in two: when encryption is established and when the server has confirmed the handshake. In order to do 0-RTT, we have to start sending after the first of those events. * Retransmits packets using the same encryption level as they were sent with. Without this, the loss of a client hello message is fatal to the connection because it will be retransmitted under encryption and the server will never be able to process it. * Makes decryption failures an ignored error. This is needed because, if a client hello message is lost, the subsequent packets will be encrypted and the server won't have the decrypter to process them. * Changes how decrypters are handled by the framer. A server now replaces its decrypter completely - thus removing the NullDecrypter. The client now has latching alternative decrypters which replace the primary decrypter when used. This doesn't completely close the hole: the connection still needs to worry about plaintext packets injected into the client. This change does not implement the correct fallback for the server rejecting a full client hello. It also doesn't implement a limit for the number of packets that we'll send without the server confirming the handshake. I'm hoping that rch can do that much more easily than I can! Merge internal change: 44690884 R=rch@chromium.org Review URL: https://chromiumcodereview.appspot.com/14718011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_stream_factory_test.cc')
-rw-r--r--net/quic/quic_stream_factory_test.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc
index c9c9177..0ebeb79 100644
--- a/net/quic/quic_stream_factory_test.cc
+++ b/net/quic/quic_stream_factory_test.cc
@@ -71,18 +71,14 @@ class QuicStreamFactoryTest : public ::testing::Test {
feedback.tcp.accumulated_number_of_lost_packets = 0;
feedback.tcp.receive_window = 16000;
- QuicFramer framer(kQuicVersion1,
- QuicDecrypter::Create(kNULL),
- QuicEncrypter::Create(kNULL),
- QuicTime::Zero(),
- false);
+ QuicFramer framer(kQuicVersion1, QuicTime::Zero(), false);
QuicFrames frames;
frames.push_back(QuicFrame(&ack));
frames.push_back(QuicFrame(&feedback));
scoped_ptr<QuicPacket> packet(
framer.ConstructFrameDataPacket(header, frames).packet);
- return scoped_ptr<QuicEncryptedPacket>(
- framer.EncryptPacket(header.packet_sequence_number, *packet));
+ return scoped_ptr<QuicEncryptedPacket>(framer.EncryptPacket(
+ ENCRYPTION_NONE, header.packet_sequence_number, *packet));
}
// Returns a newly created packet to send congestion feedback data.
@@ -110,17 +106,13 @@ class QuicStreamFactoryTest : public ::testing::Test {
scoped_ptr<QuicEncryptedPacket> ConstructPacket(
const QuicPacketHeader& header,
const QuicFrame& frame) {
- QuicFramer framer(kQuicVersion1,
- QuicDecrypter::Create(kNULL),
- QuicEncrypter::Create(kNULL),
- QuicTime::Zero(),
- false);
+ QuicFramer framer(kQuicVersion1, QuicTime::Zero(), false);
QuicFrames frames;
frames.push_back(frame);
scoped_ptr<QuicPacket> packet(
framer.ConstructFrameDataPacket(header, frames).packet);
- return scoped_ptr<QuicEncryptedPacket>(
- framer.EncryptPacket(header.packet_sequence_number, *packet));
+ return scoped_ptr<QuicEncryptedPacket>(framer.EncryptPacket(
+ ENCRYPTION_NONE, header.packet_sequence_number, *packet));
}
MockHostResolver host_resolver_;