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

Side by Side Diff: net/quic/crypto/quic_crypto_server_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
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_server_config.h" 5 #include "net/quic/crypto/quic_crypto_server_config.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 encoded_public_values.append(p256_public_value.data(), 287 encoded_public_values.append(p256_public_value.data(),
288 p256_public_value.size()); 288 p256_public_value.size());
289 } 289 }
290 290
291 msg.set_tag(kSCFG); 291 msg.set_tag(kSCFG);
292 if (options.p256) { 292 if (options.p256) {
293 msg.SetTaglist(kKEXS, kC255, kP256, 0); 293 msg.SetTaglist(kKEXS, kC255, kP256, 0);
294 } else { 294 } else {
295 msg.SetTaglist(kKEXS, kC255, 0); 295 msg.SetTaglist(kKEXS, kC255, 0);
296 } 296 }
297 if (FLAGS_quic_crypto_server_config_default_has_chacha20) { 297 if (FLAGS_quic_crypto_server_config_default_has_chacha20 &&
298 if (ChaCha20Poly1305Rfc7539Encrypter::IsSupported()) { 298 ChaCha20Poly1305Rfc7539Encrypter::IsSupported()) {
299 msg.SetTaglist(kAEAD, kAESG, kCC12, kCC20, 0); 299 msg.SetTaglist(kAEAD, kAESG, kCC20, 0);
300 } else {
301 msg.SetTaglist(kAEAD, kAESG, kCC12, 0);
302 }
303 } else { 300 } else {
304 msg.SetTaglist(kAEAD, kAESG, 0); 301 msg.SetTaglist(kAEAD, kAESG, 0);
305 } 302 }
306 msg.SetStringPiece(kPUBS, encoded_public_values); 303 msg.SetStringPiece(kPUBS, encoded_public_values);
307 304
308 if (options.expiry_time.IsZero()) { 305 if (options.expiry_time.IsZero()) {
309 const QuicWallTime now = clock->WallNow(); 306 const QuicWallTime now = clock->WallNow();
310 const QuicWallTime expiry = now.Add(QuicTime::Delta::FromSeconds( 307 const QuicWallTime expiry = now.Add(QuicTime::Delta::FromSeconds(
311 60 * 60 * 24 * 180 /* 180 days, ~six months */)); 308 60 * 60 * 24 * 180 /* 180 days, ~six months */));
312 const uint64_t expiry_seconds = expiry.ToUNIXSeconds(); 309 const uint64_t expiry_seconds = expiry.ToUNIXSeconds();
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 priority(0), 1815 priority(0),
1819 source_address_token_boxer(nullptr) {} 1816 source_address_token_boxer(nullptr) {}
1820 1817
1821 QuicCryptoServerConfig::Config::~Config() { 1818 QuicCryptoServerConfig::Config::~Config() {
1822 STLDeleteElements(&key_exchanges); 1819 STLDeleteElements(&key_exchanges);
1823 } 1820 }
1824 1821
1825 QuicCryptoProof::QuicCryptoProof() {} 1822 QuicCryptoProof::QuicCryptoProof() {}
1826 QuicCryptoProof::~QuicCryptoProof() {} 1823 QuicCryptoProof::~QuicCryptoProof() {}
1827 } // namespace net 1824 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_client_config.cc ('k') | net/quic/crypto/quic_crypto_server_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698