OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/crypto/quic_crypto_client_config.h" | 5 #include "net/quic/crypto/quic_crypto_client_config.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/metrics/sparse_histogram.h" | 8 #include "base/metrics/sparse_histogram.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 277 |
278 void QuicCryptoClientConfig::CachedState::InitializeFrom( | 278 void QuicCryptoClientConfig::CachedState::InitializeFrom( |
279 const QuicCryptoClientConfig::CachedState& other) { | 279 const QuicCryptoClientConfig::CachedState& other) { |
280 DCHECK(server_config_.empty()); | 280 DCHECK(server_config_.empty()); |
281 DCHECK(!server_config_valid_); | 281 DCHECK(!server_config_valid_); |
282 server_config_ = other.server_config_; | 282 server_config_ = other.server_config_; |
283 source_address_token_ = other.source_address_token_; | 283 source_address_token_ = other.source_address_token_; |
284 certs_ = other.certs_; | 284 certs_ = other.certs_; |
285 server_config_sig_ = other.server_config_sig_; | 285 server_config_sig_ = other.server_config_sig_; |
286 server_config_valid_ = other.server_config_valid_; | 286 server_config_valid_ = other.server_config_valid_; |
| 287 if (other.proof_verify_details_) { |
| 288 proof_verify_details_.reset(other.proof_verify_details_->Clone()); |
| 289 } |
287 ++generation_counter_; | 290 ++generation_counter_; |
288 } | 291 } |
289 | 292 |
290 void QuicCryptoClientConfig::SetDefaults() { | 293 void QuicCryptoClientConfig::SetDefaults() { |
291 // Key exchange methods. | 294 // Key exchange methods. |
292 kexs.resize(2); | 295 kexs.resize(2); |
293 kexs[0] = kC255; | 296 kexs[0] = kC255; |
294 kexs[1] = kP256; | 297 kexs[1] = kP256; |
295 | 298 |
296 // Authenticated encryption algorithms. Prefer ChaCha20 by default. | 299 // Authenticated encryption algorithms. Prefer ChaCha20 by default. |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 return; | 835 return; |
833 } | 836 } |
834 | 837 |
835 // Update canonical version to point at the "most recent" entry. | 838 // Update canonical version to point at the "most recent" entry. |
836 canonical_server_map_[suffix_server_id] = server_id; | 839 canonical_server_map_[suffix_server_id] = server_id; |
837 | 840 |
838 server_state->InitializeFrom(*canonical_state); | 841 server_state->InitializeFrom(*canonical_state); |
839 } | 842 } |
840 | 843 |
841 } // namespace net | 844 } // namespace net |
OLD | NEW |