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_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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 if (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 } | 300 } |
303 } else { | 301 } else { |
304 msg.SetTaglist(kAEAD, kAESG, 0); | 302 msg.SetTaglist(kAEAD, kAESG, 0); |
305 } | 303 } |
306 msg.SetStringPiece(kPUBS, encoded_public_values); | 304 msg.SetStringPiece(kPUBS, encoded_public_values); |
307 | 305 |
308 if (options.expiry_time.IsZero()) { | 306 if (options.expiry_time.IsZero()) { |
309 const QuicWallTime now = clock->WallNow(); | 307 const QuicWallTime now = clock->WallNow(); |
310 const QuicWallTime expiry = now.Add(QuicTime::Delta::FromSeconds( | 308 const QuicWallTime expiry = now.Add(QuicTime::Delta::FromSeconds( |
311 60 * 60 * 24 * 180 /* 180 days, ~six months */)); | 309 60 * 60 * 24 * 180 /* 180 days, ~six months */)); |
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1818 priority(0), | 1816 priority(0), |
1819 source_address_token_boxer(nullptr) {} | 1817 source_address_token_boxer(nullptr) {} |
1820 | 1818 |
1821 QuicCryptoServerConfig::Config::~Config() { | 1819 QuicCryptoServerConfig::Config::~Config() { |
1822 STLDeleteElements(&key_exchanges); | 1820 STLDeleteElements(&key_exchanges); |
1823 } | 1821 } |
1824 | 1822 |
1825 QuicCryptoProof::QuicCryptoProof() {} | 1823 QuicCryptoProof::QuicCryptoProof() {} |
1826 QuicCryptoProof::~QuicCryptoProof() {} | 1824 QuicCryptoProof::~QuicCryptoProof() {} |
1827 } // namespace net | 1825 } // namespace net |
OLD | NEW |