Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(699)

Side by Side Diff: net/quic/crypto/quic_crypto_client_config.cc

Issue 1854273002: Remove the non-RFC 7539 variants of ChaCha20Poly1305 crypters in QUIC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/crypto/quic_crypto_server_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_protocol.h ('k') | net/quic/crypto/quic_crypto_server_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698