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

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

Issue 1037403004: Land Recent QUIC Changes until 03/27/2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 9 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/quic_crypto_server_config.h ('k') | net/quic/quic_connection.h » ('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_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 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 } 1459 }
1460 1460
1461 return config.source_address_token_boxer->Box( 1461 return config.source_address_token_boxer->Box(
1462 rand, source_address_tokens.SerializeAsString()); 1462 rand, source_address_tokens.SerializeAsString());
1463 } 1463 }
1464 1464
1465 bool QuicCryptoServerConfig::HasProofSource() const { 1465 bool QuicCryptoServerConfig::HasProofSource() const {
1466 return proof_source_ != nullptr; 1466 return proof_source_ != nullptr;
1467 } 1467 }
1468 1468
1469 int QuicCryptoServerConfig::NumberOfConfigs() const {
1470 base::AutoLock locked(configs_lock_);
1471 return configs_.size();
1472 }
1473
1469 HandshakeFailureReason QuicCryptoServerConfig::ParseSourceAddressToken( 1474 HandshakeFailureReason QuicCryptoServerConfig::ParseSourceAddressToken(
1470 const Config& config, 1475 const Config& config,
1471 StringPiece token, 1476 StringPiece token,
1472 SourceAddressTokens* tokens) const { 1477 SourceAddressTokens* tokens) const {
1473 string storage; 1478 string storage;
1474 StringPiece plaintext; 1479 StringPiece plaintext;
1475 if (!config.source_address_token_boxer->Unbox(token, &storage, &plaintext)) { 1480 if (!config.source_address_token_boxer->Unbox(token, &storage, &plaintext)) {
1476 return SOURCE_ADDRESS_TOKEN_DECRYPTION_FAILURE; 1481 return SOURCE_ADDRESS_TOKEN_DECRYPTION_FAILURE;
1477 } 1482 }
1478 1483
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 QuicCryptoServerConfig::Config::Config() 1697 QuicCryptoServerConfig::Config::Config()
1693 : channel_id_enabled(false), 1698 : channel_id_enabled(false),
1694 is_primary(false), 1699 is_primary(false),
1695 primary_time(QuicWallTime::Zero()), 1700 primary_time(QuicWallTime::Zero()),
1696 priority(0), 1701 priority(0),
1697 source_address_token_boxer(nullptr) {} 1702 source_address_token_boxer(nullptr) {}
1698 1703
1699 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } 1704 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); }
1700 1705
1701 } // namespace net 1706 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config.h ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698