Landing Recent QUIC changes until 2015-11-09 20:32 UTC

Add client-side support of cert transparency for QUIC, gated at QUIC_VERSION_30.

With this change, when the negotiated version > QUIC_VERSION_29, the client indicates that it supports cert transparency in client hello, and caches the CSCT value if it exists in server's response. However, the client NEITHER demands SCT NOR verifies the received SCT (e.g., it is up to Chrome how to verify).
Merge internal change: 107397642
https://codereview.chromium.org/1435943002/

Not sending QUIC packets if the send alarm is set. Behind FLAGS_respect_send_alarm

This fixes a subtle bug where we weren't always respecting priorities when writing.

I posit that if we are send limited by the sent packet manager, we expect to
resume with OnCanWrite, and resume the highest priority session.  Unfortunately
right now that's not the case.  When the highest priority session gets blocked
by the sent packet manager it schedules the alarm. However it's perfectly
possible that before the alarm fires, we get an incoming request, process it,
that stream checks to see if it can write, and when CanWrite checks now(), we
are past the time when the alarm should have fired (due to doing a lot of work,
busy machine, what have you) and write data for the random stream.
Merge internal change: 107380116
https://codereview.chromium.org/1439653002/

Add token binding negotiation to QUIC

This adds a tag (TBKP) to the SCFG and CHLO messages containing a taglist as a value of the supported token binding key parameters (P256 is currently the only supported param). This replaces the TLS token binding negotiation extension as part of the broader Token Binding spec when done over QUIC.

Token binding negotiation is off by default - it must be turned on server-side in QuicCryptoServerConfig::ConfigOptions and client side in QuicCryptoClientConfig. If it is enabled, the application layer using QUIC must handle the rest of the Token Binding protocol.

More information (including links to the Token Binding specs) is in this doc: https://docs.google.com/document/d/12eKfkdC7g5IGUCtghzg7Wi__qiEkY65fX09n8sjLtHg/edit?pli=1#heading=h.y8fw05yhvdsg
Merge internal change: 107277639
https://codereview.chromium.org/1437893002/

Make comments for EndToEndTest.LargePostEarlyResponse more clear. Rearrange code to clarifying the logic when sending request header and body separately.
Merge internal change: 107261172
https://codereview.chromium.org/1433353002/

Further reduce the number of QUIC end-to-end test variations that we run from 54 to 30, by only running the version negotiation variants when either all or none of other options are enabled.

Among other things, this will help the perfomance of these test
in the Chrome memory bots.
Merge internal change: 107172676
https://codereview.chromium.org/1414953012/

Add some helper methods to QuicTestServer
Merge internal change: 107150707
https://codereview.chromium.org/1433813002/

Move the call to revive packets from QuicConnection::ProcessUdpPacket to QuicConnection::OnPacketComplete. This avoid hitting a DCHECK in the EndToEnd tests when: FEC is enabled, stateless rejects are enabled and packets are reordered.
Merge internal change: 107136813
https://codereview.chromium.org/1419303009/

Reduce the number of QUIC end-to-end test combinations that are from from 240 to 46, by looking at five of the options, and only running when either none of them, all of them or just one of them is enabled.
Merge internal change: 107135565
https://codereview.chromium.org/1418503022/

Clean up "magic" constants in QuicFramerTest to add comments which explains their values and extract out to named constants.
Merge internal change: 107036345
https://codereview.chromium.org/1435673002/

Replace QuicEncryptedPacket argument in QuicConnectionDebugVisitor::OnPacketSent with an encrypted length. No functional change.
Merge internal change: 107034442
https://codereview.chromium.org/1433783004/

Override ReliableQuicStream::StopReading() to send RST_STREAM+NO_ERROR if CloseWriteSide() is called before StopReading().

Currently we always call StopReading() before calling CloseWriteSide(). However, there is not restriction to prevent calling StopReading() after CloseWrite(), in which case we should also send a QUIC_STREAM_NO_ERROR rst to stop the peer to sending more data. This feature improves RST_STREAM+NO_ERROR mechanism to be more future-proof.
Merge internal change: 106990301
https://codereview.chromium.org/1433063002/

Update the comment of --quic_version.
Merge internal change: 106978852
https://codereview.chromium.org/1425823005/

Pass in connection ID and supported version to  QuicFramer::BuildVersionNegotiationPacket, instead of passing in a QuicPacketHeader and supported versions.
Merge internal change: 106955386
https://codereview.chromium.org/1433703005/

Change bufferring data structure for QuicStreamSequencer. Protected by FLAGS_quic_use_stream_sequencer_buffer.
Swith QuicStreamSequencer's underlying data structure from QuicFrameList to StreamSequencerBuffer.
Merge internal change: 106947577
https://codereview.chromium.org/1433793002/

Add include to reflect what is already used.
Merge internal change: 106946658
https://codereview.chromium.org/1433013003/

Add a data structure QuicMultipathTransmissionsMap which is not in use now.
QuicMultipathTransmissionsMap manages packets which are transmitted across multiple paths. Also add a new struct QuicPathIdPacketNumber which comprises both QuicPathId and QuicPacketNumber.
Merge internal change: 106938391
https://codereview.chromium.org/1431363002/

Earlier check for nullptr.
Merge internal change: 106859834
https://codereview.chromium.org/1433783003/

Quic streams honor RST_STREAM + NO_ERROR on the write side.

Override QuicDataStream CloseWriteSide method to honor QUIC_STREAM_NO_ERROR on QUIC_VERSION_29 or later versions: send rst stream when writing to a stream initiated by the peer is finished but incoming data hasn't been received completely.
Merge internal change: 106853342
https://codereview.chromium.org/1413373013/

Add OnConnectionMigration method to QuicSentPacketManager. Add OnConnectionMigration interface to SendAlgorithmInterface and RttStats. No functional change expected.

This change is preparing to reset cwnd and rtt measurement when the client migrates to a different network.
Merge internal change: 106851267
https://codereview.chromium.org/1435553004/

Factoring a QuicCryptoServerStreamBase API out of QuicCryptoServerStream
Merge internal change: 106845785
https://codereview.chromium.org/1413613016/

Deprecate --gfe2_reloadable_flag_quic_stop_checking_for_mismatch_ids
Merge internal change: 106845547
https://codereview.chromium.org/1418963008/

No functional change.  Minor change to reorder when the list of QuicAckListeners is swapped into the TransmissionInfo in order to avoid an extra allocation.
Merge internal change: 106814823
https://codereview.chromium.org/1428303003/

Review URL: https://codereview.chromium.org/1437023002

Cr-Commit-Position: refs/heads/master@{#359370}
diff --git a/net/quic/crypto/proof_verifier_chromium.h b/net/quic/crypto/proof_verifier_chromium.h
index 46d63e1..77a6714 100644
--- a/net/quic/crypto/proof_verifier_chromium.h
+++ b/net/quic/crypto/proof_verifier_chromium.h
@@ -65,6 +65,7 @@
   QuicAsyncStatus VerifyProof(const std::string& hostname,
                               const std::string& server_config,
                               const std::vector<std::string>& certs,
+                              const std::string& cert_sct,
                               const std::string& signature,
                               const ProofVerifyContext* verify_context,
                               std::string* error_details,