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

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

Issue 515303003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix for 409191 Created 6 years, 3 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
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_server_stream_test.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_server_stream.h" 5 #include "net/quic/quic_crypto_server_stream.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "crypto/secure_hash.h" 8 #include "crypto/secure_hash.h"
9 #include "net/quic/crypto/crypto_protocol.h" 9 #include "net/quic/crypto/crypto_protocol.h"
10 #include "net/quic/crypto/crypto_utils.h" 10 #include "net/quic/crypto/crypto_utils.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 handshake_confirmed_ = true; 151 handshake_confirmed_ = true;
152 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); 152 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED);
153 153
154 // Now that the handshake is complete, send an updated server config and 154 // Now that the handshake is complete, send an updated server config and
155 // source-address token to the client. 155 // source-address token to the client.
156 SendServerConfigUpdate(NULL); 156 SendServerConfigUpdate(NULL);
157 } 157 }
158 158
159 void QuicCryptoServerStream::SendServerConfigUpdate( 159 void QuicCryptoServerStream::SendServerConfigUpdate(
160 const CachedNetworkParameters* cached_network_params) { 160 const CachedNetworkParameters* cached_network_params) {
161 if (session()->connection()->version() <= QUIC_VERSION_21) { 161 if (session()->connection()->version() <= QUIC_VERSION_21 ||
162 !handshake_confirmed_) {
162 return; 163 return;
163 } 164 }
164 165
165 CryptoHandshakeMessage server_config_update_message; 166 CryptoHandshakeMessage server_config_update_message;
166 if (!crypto_config_.BuildServerConfigUpdateMessage( 167 if (!crypto_config_.BuildServerConfigUpdateMessage(
167 session()->connection()->peer_address(), 168 session()->connection()->peer_address(),
168 session()->connection()->clock(), 169 session()->connection()->clock(),
169 session()->connection()->random_generator(), 170 session()->connection()->random_generator(),
170 crypto_negotiated_params_, 171 crypto_negotiated_params_,
171 cached_network_params, 172 cached_network_params,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 246
246 void QuicCryptoServerStream::ValidateCallback::RunImpl( 247 void QuicCryptoServerStream::ValidateCallback::RunImpl(
247 const CryptoHandshakeMessage& client_hello, 248 const CryptoHandshakeMessage& client_hello,
248 const Result& result) { 249 const Result& result) {
249 if (parent_ != NULL) { 250 if (parent_ != NULL) {
250 parent_->FinishProcessingHandshakeMessage(client_hello, result); 251 parent_->FinishProcessingHandshakeMessage(client_hello, result);
251 } 252 }
252 } 253 }
253 254
254 } // namespace net 255 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698