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

Side by Side Diff: net/quic/quic_crypto_client_stream.cc

Issue 14651009: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix integer constant is too large for 'unsigned long' type Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_bandwidth.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_crypto_client_stream.h" 5 #include "net/quic/quic_crypto_client_stream.h"
6 6
7 #include "net/quic/crypto/crypto_protocol.h" 7 #include "net/quic/crypto/crypto_protocol.h"
8 #include "net/quic/crypto/crypto_utils.h" 8 #include "net/quic/crypto/crypto_utils.h"
9 #include "net/quic/crypto/null_encrypter.h" 9 #include "net/quic/crypto/null_encrypter.h"
10 #include "net/quic/crypto/proof_verifier.h" 10 #include "net/quic/crypto/proof_verifier.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 next_state_ = STATE_IDLE; 78 next_state_ = STATE_IDLE;
79 switch (state) { 79 switch (state) {
80 case STATE_SEND_CHLO: { 80 case STATE_SEND_CHLO: {
81 if (num_client_hellos_ > kMaxClientHellos) { 81 if (num_client_hellos_ > kMaxClientHellos) {
82 CloseConnection(QUIC_CRYPTO_TOO_MANY_REJECTS); 82 CloseConnection(QUIC_CRYPTO_TOO_MANY_REJECTS);
83 return; 83 return;
84 } 84 }
85 num_client_hellos_++; 85 num_client_hellos_++;
86 86
87 if (!cached->is_complete()) { 87 if (!cached->is_complete()) {
88 crypto_config_->FillInchoateClientHello(server_hostname_, cached, 88 crypto_config_->FillInchoateClientHello(
89 &out); 89 server_hostname_, cached, &crypto_negotiated_params_, &out);
90 next_state_ = STATE_RECV_REJ; 90 next_state_ = STATE_RECV_REJ;
91 DLOG(INFO) << "Client Sending: " << out.DebugString(); 91 DLOG(INFO) << "Client Sending: " << out.DebugString();
92 SendHandshakeMessage(out); 92 SendHandshakeMessage(out);
93 return; 93 return;
94 } 94 }
95 const CryptoHandshakeMessage* scfg = cached->GetServerConfig(); 95 const CryptoHandshakeMessage* scfg = cached->GetServerConfig();
96 config_.ToHandshakeMessage(&out); 96 config_.ToHandshakeMessage(&out);
97 error = crypto_config_->FillClientHello( 97 error = crypto_config_->FillClientHello(
98 server_hostname_, 98 server_hostname_,
99 session()->connection()->guid(), 99 session()->connection()->guid(),
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 return; 199 return;
200 case STATE_IDLE: 200 case STATE_IDLE:
201 // This means that the peer sent us a message that we weren't expecting. 201 // This means that the peer sent us a message that we weren't expecting.
202 CloseConnection(QUIC_INVALID_CRYPTO_MESSAGE_TYPE); 202 CloseConnection(QUIC_INVALID_CRYPTO_MESSAGE_TYPE);
203 return; 203 return;
204 } 204 }
205 } 205 }
206 } 206 }
207 207
208 } // namespace net 208 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_bandwidth.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698