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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 if (now.IsBefore(timestamp) && 1454 if (now.IsBefore(timestamp) &&
1455 delta.ToSeconds() > source_address_token_future_secs_) { 1455 delta.ToSeconds() > source_address_token_future_secs_) {
1456 return SOURCE_ADDRESS_TOKEN_CLOCK_SKEW_FAILURE; 1456 return SOURCE_ADDRESS_TOKEN_CLOCK_SKEW_FAILURE;
1457 } 1457 }
1458 1458
1459 if (now.IsAfter(timestamp) && 1459 if (now.IsAfter(timestamp) &&
1460 delta.ToSeconds() > source_address_token_lifetime_secs_) { 1460 delta.ToSeconds() > source_address_token_lifetime_secs_) {
1461 return SOURCE_ADDRESS_TOKEN_EXPIRED_FAILURE; 1461 return SOURCE_ADDRESS_TOKEN_EXPIRED_FAILURE;
1462 } 1462 }
1463 1463
1464 if (FLAGS_quic_store_cached_network_params_from_chlo && 1464 if (source_address_token.has_cached_network_parameters()) {
1465 source_address_token.has_cached_network_parameters()) {
1466 *cached_network_params = source_address_token.cached_network_parameters(); 1465 *cached_network_params = source_address_token.cached_network_parameters();
1467 } 1466 }
1468 1467
1469 return HANDSHAKE_OK; 1468 return HANDSHAKE_OK;
1470 } 1469 }
1471 1470
1472 // kServerNoncePlaintextSize is the number of bytes in an unencrypted server 1471 // kServerNoncePlaintextSize is the number of bytes in an unencrypted server
1473 // nonce. 1472 // nonce.
1474 static const size_t kServerNoncePlaintextSize = 1473 static const size_t kServerNoncePlaintextSize =
1475 4 /* timestamp */ + 20 /* random bytes */; 1474 4 /* timestamp */ + 20 /* random bytes */;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 QuicCryptoServerConfig::Config::Config() 1554 QuicCryptoServerConfig::Config::Config()
1556 : channel_id_enabled(false), 1555 : channel_id_enabled(false),
1557 is_primary(false), 1556 is_primary(false),
1558 primary_time(QuicWallTime::Zero()), 1557 primary_time(QuicWallTime::Zero()),
1559 priority(0), 1558 priority(0),
1560 source_address_token_boxer(nullptr) {} 1559 source_address_token_boxer(nullptr) {}
1561 1560
1562 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } 1561 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); }
1563 1562
1564 } // namespace net 1563 } // 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