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

Issue 14083012: QUIC: retransmit packets with the correct encryption. (Closed)

Created:
7 years, 8 months ago by ramant (doing other things)
Modified:
7 years, 7 months ago
Reviewers:
wtc, Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, wtc
Visibility:
Public.

Description

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 BUG=

Patch Set 1 #

Total comments: 5

Patch Set 2 : Merge ToT and Reset the callback in case of errors #

Total comments: 6

Patch Set 3 : fix comments #

Patch Set 4 : CompleteCryptoHandshake in GoAwayReceived unittest and do DCHECK in destructor #

Patch Set 5 : Merge with ToT #

Patch Set 6 : zero rtt test #

Total comments: 8

Patch Set 7 : Moved HandshakeMode enum to MockCryptoClientStream #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+769 lines, -326 lines) Patch
M net/quic/quic_client_session.h View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M net/quic/quic_client_session.cc View 1 2 3 4 5 chunks +19 lines, -5 lines 2 comments Download
M net/quic/quic_client_session_test.cc View 1 2 3 3 chunks +9 lines, -12 lines 0 comments Download
M net/quic/quic_connection.h View 4 chunks +47 lines, -35 lines 0 comments Download
M net/quic/quic_connection.cc View 12 chunks +51 lines, -19 lines 0 comments Download
M net/quic/quic_connection_helper_test.cc View 4 chunks +7 lines, -8 lines 0 comments Download
M net/quic/quic_connection_test.cc View 1 2 25 chunks +211 lines, -30 lines 0 comments Download
M net/quic/quic_crypto_client_stream.h View 1 chunk +0 lines, -6 lines 0 comments Download
M net/quic/quic_crypto_client_stream.cc View 1 5 chunks +26 lines, -18 lines 0 comments Download
M net/quic/quic_crypto_client_stream_test.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M net/quic/quic_crypto_server_stream.cc View 2 chunks +12 lines, -7 lines 0 comments Download
M net/quic/quic_crypto_server_stream_test.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M net/quic/quic_crypto_stream.h View 1 chunk +4 lines, -3 lines 0 comments Download
M net/quic/quic_crypto_stream.cc View 3 chunks +4 lines, -8 lines 0 comments Download
M net/quic/quic_crypto_stream_test.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/quic/quic_framer.h View 3 chunks +34 lines, -14 lines 0 comments Download
M net/quic/quic_framer.cc View 5 chunks +67 lines, -21 lines 0 comments Download
M net/quic/quic_framer_test.cc View 7 chunks +13 lines, -7 lines 0 comments Download
M net/quic/quic_http_stream_test.cc View 3 chunks +4 lines, -7 lines 0 comments Download
M net/quic/quic_network_transaction_unittest.cc View 1 2 3 4 5 6 3 chunks +70 lines, -14 lines 0 comments Download
M net/quic/quic_packet_creator_test.cc View 2 chunks +4 lines, -11 lines 0 comments Download
M net/quic/quic_packet_generator_test.cc View 1 chunk +1 line, -5 lines 0 comments Download
M net/quic/quic_protocol.h View 1 2 chunks +18 lines, -0 lines 0 comments Download
M net/quic/quic_protocol.cc View 2 chunks +7 lines, -1 line 0 comments Download
M net/quic/quic_session.h View 2 chunks +34 lines, -7 lines 0 comments Download
M net/quic/quic_session.cc View 1 chunk +7 lines, -4 lines 0 comments Download
M net/quic/quic_session_test.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M net/quic/quic_stream_factory_test.cc View 2 chunks +6 lines, -14 lines 0 comments Download
M net/quic/test_tools/crypto_test_utils.cc View 2 chunks +24 lines, -17 lines 0 comments Download
M net/quic/test_tools/mock_crypto_client_stream.h View 1 2 3 4 5 6 2 chunks +20 lines, -4 lines 0 comments Download
M net/quic/test_tools/mock_crypto_client_stream.cc View 1 2 3 4 5 6 2 chunks +15 lines, -3 lines 0 comments Download
M net/quic/test_tools/mock_crypto_client_stream_factory.h View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M net/quic/test_tools/mock_crypto_client_stream_factory.cc View 1 2 3 4 5 6 2 chunks +5 lines, -2 lines 0 comments Download
M net/quic/test_tools/quic_test_utils.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/quic/test_tools/quic_test_utils.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M net/quic/test_tools/simple_quic_framer.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M net/tools/quic/quic_client.h View 1 chunk +4 lines, -4 lines 0 comments Download
M net/tools/quic/quic_client.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M net/tools/quic/quic_client_session.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M net/tools/quic/quic_epoll_connection_helper_test.cc View 3 chunks +3 lines, -11 lines 0 comments Download
M net/tools/quic/quic_time_wait_list_manager.cc View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
ramant (doing other things)
7 years, 8 months ago (2013-04-25 00:03:18 UTC) #1
ramant (doing other things)
Hi Ryan, Ported all the changes from agl except for the following: QuicClientSessionTest's CompleteCryptoHandshake passed ...
7 years, 8 months ago (2013-04-25 00:11:58 UTC) #2
wtc
Patch set 1 LGTM. https://codereview.chromium.org/14083012/diff/1/net/quic/quic_client_session.cc File net/quic/quic_client_session.cc (right): https://codereview.chromium.org/14083012/diff/1/net/quic/quic_client_session.cc#newcode114 net/quic/quic_client_session.cc:114: // TODO(rtenneti): how should we ...
7 years, 8 months ago (2013-04-25 00:39:18 UTC) #3
Ryan Hamilton
https://codereview.chromium.org/14083012/diff/1/net/quic/quic_client_session.cc File net/quic/quic_client_session.cc (right): https://codereview.chromium.org/14083012/diff/1/net/quic/quic_client_session.cc#newcode114 net/quic/quic_client_session.cc:114: // TODO(rtenneti): how should we handle ENCRYPTION_FIRST_ESTABLISHED event? On ...
7 years, 8 months ago (2013-04-25 17:59:45 UTC) #4
agl
On 2013/04/25 17:59:45, Ryan Hamilton wrote: > I believe we should handle this even by ...
7 years, 8 months ago (2013-04-25 18:04:58 UTC) #5
ramant (doing other things)
PTAL. https://codereview.chromium.org/14083012/diff/1/net/quic/quic_client_session.cc File net/quic/quic_client_session.cc (right): https://codereview.chromium.org/14083012/diff/1/net/quic/quic_client_session.cc#newcode114 net/quic/quic_client_session.cc:114: // TODO(rtenneti): how should we handle ENCRYPTION_FIRST_ESTABLISHED event? ...
7 years, 8 months ago (2013-04-26 19:29:54 UTC) #6
Ryan Hamilton
https://codereview.chromium.org/14083012/diff/9001/net/quic/quic_client_session.cc File net/quic/quic_client_session.cc (right): https://codereview.chromium.org/14083012/diff/9001/net/quic/quic_client_session.cc#newcode54 net/quic/quic_client_session.cc:54: callback_.Reset(); I though we were going to run the ...
7 years, 8 months ago (2013-04-26 19:52:17 UTC) #7
ramant (doing other things)
Hi Ryan, Please take another look. thanks raman https://chromiumcodereview.appspot.com/14083012/diff/9001/net/quic/quic_client_session.cc File net/quic/quic_client_session.cc (right): https://chromiumcodereview.appspot.com/14083012/diff/9001/net/quic/quic_client_session.cc#newcode54 net/quic/quic_client_session.cc:54: callback_.Reset(); ...
7 years, 7 months ago (2013-04-30 02:17:03 UTC) #8
Ryan Hamilton
https://chromiumcodereview.appspot.com/14083012/diff/9001/net/quic/quic_client_session.cc File net/quic/quic_client_session.cc (right): https://chromiumcodereview.appspot.com/14083012/diff/9001/net/quic/quic_client_session.cc#newcode54 net/quic/quic_client_session.cc:54: callback_.Reset(); On 2013/04/30 02:17:03, ramant wrote: > On 2013/04/26 ...
7 years, 7 months ago (2013-04-30 02:56:14 UTC) #9
wtc
Patch set 3 LGTM. Please wait for rch's approval.
7 years, 7 months ago (2013-04-30 15:54:02 UTC) #10
ramant (doing other things)
https://chromiumcodereview.appspot.com/14083012/diff/9001/net/quic/quic_client_session.cc File net/quic/quic_client_session.cc (right): https://chromiumcodereview.appspot.com/14083012/diff/9001/net/quic/quic_client_session.cc#newcode54 net/quic/quic_client_session.cc:54: callback_.Reset(); On 2013/04/30 02:56:14, Ryan Hamilton wrote: > On ...
7 years, 7 months ago (2013-04-30 19:00:32 UTC) #11
ramant (doing other things)
Hi Ryan, Added the zero RTT unit test. MockCryptoClientStream::CryptoConnect doesn't set handshake_confirmed_ to true. ZeroRTT ...
7 years, 7 months ago (2013-05-01 23:39:03 UTC) #12
Ryan Hamilton
couple small nits and you're good to go. https://chromiumcodereview.appspot.com/14083012/diff/77002/net/quic/test_tools/mock_crypto_client_stream.h File net/quic/test_tools/mock_crypto_client_stream.h (right): https://chromiumcodereview.appspot.com/14083012/diff/77002/net/quic/test_tools/mock_crypto_client_stream.h#newcode13 net/quic/test_tools/mock_crypto_client_stream.h:13: #include ...
7 years, 7 months ago (2013-05-01 23:47:31 UTC) #13
ramant (doing other things)
PTAL. Thanks for your comments and quick review. https://chromiumcodereview.appspot.com/14083012/diff/77002/net/quic/test_tools/mock_crypto_client_stream.h File net/quic/test_tools/mock_crypto_client_stream.h (right): https://chromiumcodereview.appspot.com/14083012/diff/77002/net/quic/test_tools/mock_crypto_client_stream.h#newcode13 net/quic/test_tools/mock_crypto_client_stream.h:13: #include ...
7 years, 7 months ago (2013-05-02 00:08:05 UTC) #14
Ryan Hamilton
lgtm
7 years, 7 months ago (2013-05-02 01:18:46 UTC) #15
Ryan Hamilton
Sorry, one minor comment. https://chromiumcodereview.appspot.com/14083012/diff/78001/net/quic/quic_client_session.cc File net/quic/quic_client_session.cc (right): https://chromiumcodereview.appspot.com/14083012/diff/78001/net/quic/quic_client_session.cc#newcode117 net/quic/quic_client_session.cc:117: // could send the data. ...
7 years, 7 months ago (2013-05-02 17:37:36 UTC) #16
ramant (doing other things)
7 years, 7 months ago (2013-05-02 18:31:51 UTC) #17
https://chromiumcodereview.appspot.com/14083012/diff/78001/net/quic/quic_clie...
File net/quic/quic_client_session.cc (right):

https://chromiumcodereview.appspot.com/14083012/diff/78001/net/quic/quic_clie...
net/quic/quic_client_session.cc:117: // could send the data. Change the
following code if that changes.
On 2013/05/02 17:37:36, Ryan Hamilton wrote:
> I don't understand what this comment means.

Updated the comment in the CL https://chromiumcodereview.appspot.com/14718011/

Done.

Powered by Google App Engine
This is Rietveld 408576698