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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 DCHECK(!crypto_negotiated_params_.server_nonce.empty()); | 339 DCHECK(!crypto_negotiated_params_.server_nonce.empty()); |
340 } | 340 } |
341 | 341 |
342 string error_details; | 342 string error_details; |
343 QuicErrorCode error = crypto_config_->FillClientHello( | 343 QuicErrorCode error = crypto_config_->FillClientHello( |
344 server_id_, session()->connection()->connection_id(), | 344 server_id_, session()->connection()->connection_id(), |
345 session()->connection()->supported_versions().front(), cached, | 345 session()->connection()->supported_versions().front(), cached, |
346 session()->connection()->clock()->WallNow(), | 346 session()->connection()->clock()->WallNow(), |
347 session()->connection()->random_generator(), channel_id_key_.get(), | 347 session()->connection()->random_generator(), channel_id_key_.get(), |
348 &crypto_negotiated_params_, &out, &error_details); | 348 &crypto_negotiated_params_, &out, &error_details); |
349 | |
350 if (error != QUIC_NO_ERROR) { | 349 if (error != QUIC_NO_ERROR) { |
351 // Flush the cached config so that, if it's bad, the server has a | 350 // Flush the cached config so that, if it's bad, the server has a |
352 // chance to send us another in the future. | 351 // chance to send us another in the future. |
353 cached->InvalidateServerConfig(); | 352 cached->InvalidateServerConfig(); |
354 CloseConnectionWithDetails(error, error_details); | 353 CloseConnectionWithDetails(error, error_details); |
355 return; | 354 return; |
356 } | 355 } |
357 channel_id_sent_ = (channel_id_key_.get() != nullptr); | 356 channel_id_sent_ = (channel_id_key_.get() != nullptr); |
358 if (cached->proof_verify_details()) { | 357 if (cached->proof_verify_details()) { |
359 proof_handler_->OnProofVerifyDetailsAvailable( | 358 proof_handler_->OnProofVerifyDetailsAvailable( |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 } | 669 } |
671 for (size_t i = 0; i < num_their_proof_demands; i++) { | 670 for (size_t i = 0; i < num_their_proof_demands; i++) { |
672 if (their_proof_demands[i] == kCHID) { | 671 if (their_proof_demands[i] == kCHID) { |
673 return true; | 672 return true; |
674 } | 673 } |
675 } | 674 } |
676 return false; | 675 return false; |
677 } | 676 } |
678 | 677 |
679 } // namespace net | 678 } // namespace net |
OLD | NEW |