| 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/quic_crypto_client_stream.h" | 5 #include "net/quic/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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 if (FLAGS_enable_quic_stateless_reject_support && | 351 if (FLAGS_enable_quic_stateless_reject_support && |
| 352 crypto_negotiated_params_.server_nonce.empty() && | 352 crypto_negotiated_params_.server_nonce.empty() && |
| 353 cached->has_server_nonce()) { | 353 cached->has_server_nonce()) { |
| 354 crypto_negotiated_params_.server_nonce = cached->GetNextServerNonce(); | 354 crypto_negotiated_params_.server_nonce = cached->GetNextServerNonce(); |
| 355 DCHECK(!crypto_negotiated_params_.server_nonce.empty()); | 355 DCHECK(!crypto_negotiated_params_.server_nonce.empty()); |
| 356 } | 356 } |
| 357 | 357 |
| 358 string error_details; | 358 string error_details; |
| 359 QuicErrorCode error = crypto_config_->FillClientHello( | 359 QuicErrorCode error = crypto_config_->FillClientHello( |
| 360 server_id_, session()->connection()->connection_id(), | 360 server_id_, session()->connection()->connection_id(), |
| 361 session()->connection()->version(), |
| 361 session()->connection()->supported_versions().front(), cached, | 362 session()->connection()->supported_versions().front(), cached, |
| 362 session()->connection()->clock()->WallNow(), | 363 session()->connection()->clock()->WallNow(), |
| 363 session()->connection()->random_generator(), channel_id_key_.get(), | 364 session()->connection()->random_generator(), channel_id_key_.get(), |
| 364 &crypto_negotiated_params_, &out, &error_details); | 365 &crypto_negotiated_params_, &out, &error_details); |
| 365 if (error != QUIC_NO_ERROR) { | 366 if (error != QUIC_NO_ERROR) { |
| 366 // Flush the cached config so that, if it's bad, the server has a | 367 // Flush the cached config so that, if it's bad, the server has a |
| 367 // chance to send us another in the future. | 368 // chance to send us another in the future. |
| 368 cached->InvalidateServerConfig(); | 369 cached->InvalidateServerConfig(); |
| 369 CloseConnectionWithDetails(error, error_details); | 370 CloseConnectionWithDetails(error, error_details); |
| 370 return; | 371 return; |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 } | 696 } |
| 696 for (size_t i = 0; i < num_their_proof_demands; i++) { | 697 for (size_t i = 0; i < num_their_proof_demands; i++) { |
| 697 if (their_proof_demands[i] == kCHID) { | 698 if (their_proof_demands[i] == kCHID) { |
| 698 return true; | 699 return true; |
| 699 } | 700 } |
| 700 } | 701 } |
| 701 return false; | 702 return false; |
| 702 } | 703 } |
| 703 | 704 |
| 704 } // namespace net | 705 } // namespace net |
| OLD | NEW |