| 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 #ifndef NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 5 #ifndef NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| 6 #define NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 6 #define NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 class EphemeralKeySource; | 34 class EphemeralKeySource; |
| 35 class KeyExchange; | 35 class KeyExchange; |
| 36 class ProofSource; | 36 class ProofSource; |
| 37 class QuicClock; | 37 class QuicClock; |
| 38 class QuicDecrypter; | 38 class QuicDecrypter; |
| 39 class QuicEncrypter; | 39 class QuicEncrypter; |
| 40 class QuicRandom; | 40 class QuicRandom; |
| 41 class QuicServerConfigProtobuf; | 41 class QuicServerConfigProtobuf; |
| 42 class StrikeRegister; | 42 class StrikeRegister; |
| 43 class StrikeRegisterClient; | 43 class StrikeRegisterClient; |
| 44 struct QuicCryptoProof; |
| 44 | 45 |
| 45 // ClientHelloInfo contains information about a client hello message that is | 46 // ClientHelloInfo contains information about a client hello message that is |
| 46 // only kept for as long as it's being processed. | 47 // only kept for as long as it's being processed. |
| 47 struct ClientHelloInfo { | 48 struct ClientHelloInfo { |
| 48 ClientHelloInfo(const IPAddressNumber& in_client_ip, QuicWallTime in_now); | 49 ClientHelloInfo(const IPAddressNumber& in_client_ip, QuicWallTime in_now); |
| 49 ~ClientHelloInfo(); | 50 ~ClientHelloInfo(); |
| 50 | 51 |
| 51 // Inputs to EvaluateClientHello. | 52 // Inputs to EvaluateClientHello. |
| 52 const IPAddressNumber client_ip; | 53 const IPAddressNumber client_ip; |
| 53 const QuicWallTime now; | 54 const QuicWallTime now; |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 void set_enable_serving_sct(bool enable_serving_sct); | 355 void set_enable_serving_sct(bool enable_serving_sct); |
| 355 | 356 |
| 356 // Set and take ownership of the callback to invoke on primary config changes. | 357 // Set and take ownership of the callback to invoke on primary config changes. |
| 357 void AcquirePrimaryConfigChangedCb(PrimaryConfigChangedCallback* cb); | 358 void AcquirePrimaryConfigChangedCb(PrimaryConfigChangedCallback* cb); |
| 358 | 359 |
| 359 // Returns the number of configs this object owns. | 360 // Returns the number of configs this object owns. |
| 360 int NumberOfConfigs() const; | 361 int NumberOfConfigs() const; |
| 361 | 362 |
| 362 private: | 363 private: |
| 363 friend class test::QuicCryptoServerConfigPeer; | 364 friend class test::QuicCryptoServerConfigPeer; |
| 365 friend struct QuicCryptoProof; |
| 364 | 366 |
| 365 // Config represents a server config: a collection of preferences and | 367 // Config represents a server config: a collection of preferences and |
| 366 // Diffie-Hellman public values. | 368 // Diffie-Hellman public values. |
| 367 class NET_EXPORT_PRIVATE Config : public QuicCryptoConfig, | 369 class NET_EXPORT_PRIVATE Config : public QuicCryptoConfig, |
| 368 public base::RefCounted<Config> { | 370 public base::RefCounted<Config> { |
| 369 public: | 371 public: |
| 370 Config(); | 372 Config(); |
| 371 | 373 |
| 372 // TODO(rtenneti): since this is a class, we should probably do | 374 // TODO(rtenneti): since this is a class, we should probably do |
| 373 // getters/setters here. | 375 // getters/setters here. |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 uint32_t source_address_token_lifetime_secs_; | 616 uint32_t source_address_token_lifetime_secs_; |
| 615 uint32_t server_nonce_strike_register_max_entries_; | 617 uint32_t server_nonce_strike_register_max_entries_; |
| 616 uint32_t server_nonce_strike_register_window_secs_; | 618 uint32_t server_nonce_strike_register_window_secs_; |
| 617 | 619 |
| 618 // Enable serving SCT or not. | 620 // Enable serving SCT or not. |
| 619 bool enable_serving_sct_; | 621 bool enable_serving_sct_; |
| 620 | 622 |
| 621 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerConfig); | 623 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerConfig); |
| 622 }; | 624 }; |
| 623 | 625 |
| 626 struct NET_EXPORT_PRIVATE QuicCryptoProof { |
| 627 QuicCryptoProof(); |
| 628 ~QuicCryptoProof(); |
| 629 |
| 630 std::string signature; |
| 631 // QuicCryptoProof does not take ownership of |certs|. |
| 632 const std::vector<std::string>* certs; |
| 633 std::string cert_sct; |
| 634 // The server config that is used for this proof (and the rest of the |
| 635 // request). |
| 636 scoped_refptr<QuicCryptoServerConfig::Config> config; |
| 637 std::string primary_scid; |
| 638 }; |
| 639 |
| 624 } // namespace net | 640 } // namespace net |
| 625 | 641 |
| 626 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 642 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| OLD | NEW |