OLD | NEW |
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/core/quic_crypto_client_stream.h" | 5 #include "net/quic/core/quic_crypto_client_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 if (FLAGS_enable_quic_stateless_reject_support && | 330 if (FLAGS_enable_quic_stateless_reject_support && |
331 crypto_negotiated_params_->server_nonce.empty() && | 331 crypto_negotiated_params_->server_nonce.empty() && |
332 cached->has_server_nonce()) { | 332 cached->has_server_nonce()) { |
333 crypto_negotiated_params_->server_nonce = cached->GetNextServerNonce(); | 333 crypto_negotiated_params_->server_nonce = cached->GetNextServerNonce(); |
334 DCHECK(!crypto_negotiated_params_->server_nonce.empty()); | 334 DCHECK(!crypto_negotiated_params_->server_nonce.empty()); |
335 } | 335 } |
336 | 336 |
337 string error_details; | 337 string error_details; |
338 QuicErrorCode error = crypto_config_->FillClientHello( | 338 QuicErrorCode error = crypto_config_->FillClientHello( |
339 server_id_, session()->connection()->connection_id(), | 339 server_id_, session()->connection()->connection_id(), |
340 session()->connection()->version(), | |
341 session()->connection()->supported_versions().front(), cached, | 340 session()->connection()->supported_versions().front(), cached, |
342 session()->connection()->clock()->WallNow(), | 341 session()->connection()->clock()->WallNow(), |
343 session()->connection()->random_generator(), channel_id_key_.get(), | 342 session()->connection()->random_generator(), channel_id_key_.get(), |
344 crypto_negotiated_params_, &out, &error_details); | 343 crypto_negotiated_params_, &out, &error_details); |
345 if (error != QUIC_NO_ERROR) { | 344 if (error != QUIC_NO_ERROR) { |
346 // Flush the cached config so that, if it's bad, the server has a | 345 // Flush the cached config so that, if it's bad, the server has a |
347 // chance to send us another in the future. | 346 // chance to send us another in the future. |
348 cached->InvalidateServerConfig(); | 347 cached->InvalidateServerConfig(); |
349 CloseConnectionWithDetails(error, error_details); | 348 CloseConnectionWithDetails(error, error_details); |
350 return; | 349 return; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 } | 668 } |
670 for (size_t i = 0; i < num_their_proof_demands; i++) { | 669 for (size_t i = 0; i < num_their_proof_demands; i++) { |
671 if (their_proof_demands[i] == kCHID) { | 670 if (their_proof_demands[i] == kCHID) { |
672 return true; | 671 return true; |
673 } | 672 } |
674 } | 673 } |
675 return false; | 674 return false; |
676 } | 675 } |
677 | 676 |
678 } // namespace net | 677 } // namespace net |
OLD | NEW |