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_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "net/quic/crypto/cert_compressor.h" | 10 #include "net/quic/crypto/cert_compressor.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 // Key exchange methods. | 377 // Key exchange methods. |
378 kexs.resize(2); | 378 kexs.resize(2); |
379 kexs[0] = kC255; | 379 kexs[0] = kC255; |
380 kexs[1] = kP256; | 380 kexs[1] = kP256; |
381 | 381 |
382 // Authenticated encryption algorithms. Prefer RFC 7539 ChaCha20 by default. | 382 // Authenticated encryption algorithms. Prefer RFC 7539 ChaCha20 by default. |
383 aead.clear(); | 383 aead.clear(); |
384 if (ChaCha20Poly1305Rfc7539Encrypter::IsSupported()) { | 384 if (ChaCha20Poly1305Rfc7539Encrypter::IsSupported()) { |
385 aead.push_back(kCC20); | 385 aead.push_back(kCC20); |
386 } | 386 } |
387 aead.push_back(kCC12); | |
388 aead.push_back(kAESG); | 387 aead.push_back(kAESG); |
389 | 388 |
390 disable_ecdsa_ = false; | 389 disable_ecdsa_ = false; |
391 } | 390 } |
392 | 391 |
393 QuicCryptoClientConfig::CachedState* QuicCryptoClientConfig::LookupOrCreate( | 392 QuicCryptoClientConfig::CachedState* QuicCryptoClientConfig::LookupOrCreate( |
394 const QuicServerId& server_id) { | 393 const QuicServerId& server_id) { |
395 CachedStateMap::const_iterator it = cached_states_.find(server_id); | 394 CachedStateMap::const_iterator it = cached_states_.find(server_id); |
396 if (it != cached_states_.end()) { | 395 if (it != cached_states_.end()) { |
397 return it->second; | 396 return it->second; |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 } | 980 } |
982 | 981 |
983 // Update canonical version to point at the "most recent" entry. | 982 // Update canonical version to point at the "most recent" entry. |
984 canonical_server_map_[suffix_server_id] = server_id; | 983 canonical_server_map_[suffix_server_id] = server_id; |
985 | 984 |
986 server_state->InitializeFrom(*canonical_state); | 985 server_state->InitializeFrom(*canonical_state); |
987 return true; | 986 return true; |
988 } | 987 } |
989 | 988 |
990 } // namespace net | 989 } // namespace net |
OLD | NEW |