| 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/core/crypto/quic_crypto_server_config.h" | 5 #include "net/quic/core/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 #include <memory> | 10 #include <memory> | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 22 #include "net/quic/core/crypto/crypto_utils.h" | 22 #include "net/quic/core/crypto/crypto_utils.h" | 
| 23 #include "net/quic/core/crypto/curve25519_key_exchange.h" | 23 #include "net/quic/core/crypto/curve25519_key_exchange.h" | 
| 24 #include "net/quic/core/crypto/ephemeral_key_source.h" | 24 #include "net/quic/core/crypto/ephemeral_key_source.h" | 
| 25 #include "net/quic/core/crypto/key_exchange.h" | 25 #include "net/quic/core/crypto/key_exchange.h" | 
| 26 #include "net/quic/core/crypto/p256_key_exchange.h" | 26 #include "net/quic/core/crypto/p256_key_exchange.h" | 
| 27 #include "net/quic/core/crypto/proof_source.h" | 27 #include "net/quic/core/crypto/proof_source.h" | 
| 28 #include "net/quic/core/crypto/quic_decrypter.h" | 28 #include "net/quic/core/crypto/quic_decrypter.h" | 
| 29 #include "net/quic/core/crypto/quic_encrypter.h" | 29 #include "net/quic/core/crypto/quic_encrypter.h" | 
| 30 #include "net/quic/core/crypto/quic_random.h" | 30 #include "net/quic/core/crypto/quic_random.h" | 
| 31 #include "net/quic/core/proto/source_address_token.pb.h" | 31 #include "net/quic/core/proto/source_address_token.pb.h" | 
| 32 #include "net/quic/core/quic_flags.h" |  | 
| 33 #include "net/quic/core/quic_packets.h" | 32 #include "net/quic/core/quic_packets.h" | 
| 34 #include "net/quic/core/quic_socket_address_coder.h" | 33 #include "net/quic/core/quic_socket_address_coder.h" | 
| 35 #include "net/quic/core/quic_utils.h" | 34 #include "net/quic/core/quic_utils.h" | 
| 36 #include "net/quic/platform/api/quic_bug_tracker.h" | 35 #include "net/quic/platform/api/quic_bug_tracker.h" | 
| 37 #include "net/quic/platform/api/quic_clock.h" | 36 #include "net/quic/platform/api/quic_clock.h" | 
| 38 #include "net/quic/platform/api/quic_endian.h" | 37 #include "net/quic/platform/api/quic_endian.h" | 
|  | 38 #include "net/quic/platform/api/quic_flags.h" | 
| 39 #include "net/quic/platform/api/quic_hostname_utils.h" | 39 #include "net/quic/platform/api/quic_hostname_utils.h" | 
| 40 #include "net/quic/platform/api/quic_logging.h" | 40 #include "net/quic/platform/api/quic_logging.h" | 
| 41 #include "net/quic/platform/api/quic_reference_counted.h" | 41 #include "net/quic/platform/api/quic_reference_counted.h" | 
| 42 #include "net/quic/platform/api/quic_text_utils.h" | 42 #include "net/quic/platform/api/quic_text_utils.h" | 
| 43 #include "third_party/boringssl/src/include/openssl/sha.h" | 43 #include "third_party/boringssl/src/include/openssl/sha.h" | 
| 44 | 44 | 
| 45 using std::string; | 45 using std::string; | 
| 46 | 46 | 
| 47 namespace net { | 47 namespace net { | 
| 48 | 48 | 
| (...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1744   if (msg->GetUint64(kEXPY, &expiry_seconds) != QUIC_NO_ERROR) { | 1744   if (msg->GetUint64(kEXPY, &expiry_seconds) != QUIC_NO_ERROR) { | 
| 1745     QUIC_LOG(WARNING) << "Server config message is missing EXPY"; | 1745     QUIC_LOG(WARNING) << "Server config message is missing EXPY"; | 
| 1746     return nullptr; | 1746     return nullptr; | 
| 1747   } | 1747   } | 
| 1748   config->expiry_time = QuicWallTime::FromUNIXSeconds(expiry_seconds); | 1748   config->expiry_time = QuicWallTime::FromUNIXSeconds(expiry_seconds); | 
| 1749 | 1749 | 
| 1750   return config; | 1750   return config; | 
| 1751 } | 1751 } | 
| 1752 | 1752 | 
| 1753 void QuicCryptoServerConfig::SetEphemeralKeySource( | 1753 void QuicCryptoServerConfig::SetEphemeralKeySource( | 
| 1754     EphemeralKeySource* ephemeral_key_source) { | 1754     std::unique_ptr<EphemeralKeySource> ephemeral_key_source) { | 
| 1755   ephemeral_key_source_.reset(ephemeral_key_source); | 1755   ephemeral_key_source_ = std::move(ephemeral_key_source); | 
| 1756 } | 1756 } | 
| 1757 | 1757 | 
| 1758 void QuicCryptoServerConfig::set_replay_protection(bool on) { | 1758 void QuicCryptoServerConfig::set_replay_protection(bool on) { | 
| 1759   replay_protection_ = on; | 1759   replay_protection_ = on; | 
| 1760 } | 1760 } | 
| 1761 | 1761 | 
| 1762 void QuicCryptoServerConfig::set_chlo_multiplier(size_t multiplier) { | 1762 void QuicCryptoServerConfig::set_chlo_multiplier(size_t multiplier) { | 
| 1763   chlo_multiplier_ = multiplier; | 1763   chlo_multiplier_ = multiplier; | 
| 1764 } | 1764 } | 
| 1765 | 1765 | 
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1965       expiry_time(QuicWallTime::Zero()), | 1965       expiry_time(QuicWallTime::Zero()), | 
| 1966       priority(0), | 1966       priority(0), | 
| 1967       source_address_token_boxer(nullptr) {} | 1967       source_address_token_boxer(nullptr) {} | 
| 1968 | 1968 | 
| 1969 QuicCryptoServerConfig::Config::~Config() {} | 1969 QuicCryptoServerConfig::Config::~Config() {} | 
| 1970 | 1970 | 
| 1971 QuicSignedServerConfig::QuicSignedServerConfig() {} | 1971 QuicSignedServerConfig::QuicSignedServerConfig() {} | 
| 1972 QuicSignedServerConfig::~QuicSignedServerConfig() {} | 1972 QuicSignedServerConfig::~QuicSignedServerConfig() {} | 
| 1973 | 1973 | 
| 1974 }  // namespace net | 1974 }  // namespace net | 
| OLD | NEW | 
|---|