| 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 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <memory> | 12 #include <memory> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/strings/string_piece.h" | 18 #include "base/strings/string_piece.h" |
| 19 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
| 20 #include "net/base/ip_address.h" | 20 #include "net/base/ip_address.h" |
| 21 #include "net/base/ip_endpoint.h" | 21 #include "net/base/ip_endpoint.h" |
| 22 #include "net/base/net_export.h" | 22 #include "net/base/net_export.h" |
| 23 #include "net/quic/core/crypto/crypto_handshake.h" | 23 #include "net/quic/core/crypto/crypto_handshake.h" |
| 24 #include "net/quic/core/crypto/crypto_handshake_message.h" | 24 #include "net/quic/core/crypto/crypto_handshake_message.h" |
| 25 #include "net/quic/core/crypto/crypto_protocol.h" | 25 #include "net/quic/core/crypto/crypto_protocol.h" |
| 26 #include "net/quic/core/crypto/crypto_secret_boxer.h" | 26 #include "net/quic/core/crypto/crypto_secret_boxer.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_compressed_certs_cache.h" | 28 #include "net/quic/core/crypto/quic_compressed_certs_cache.h" |
| 29 #include "net/quic/core/crypto/quic_crypto_proof.h" |
| 29 #include "net/quic/core/proto/cached_network_parameters.pb.h" | 30 #include "net/quic/core/proto/cached_network_parameters.pb.h" |
| 30 #include "net/quic/core/proto/source_address_token.pb.h" | 31 #include "net/quic/core/proto/source_address_token.pb.h" |
| 31 #include "net/quic/core/quic_time.h" | 32 #include "net/quic/core/quic_time.h" |
| 32 #include "net/quic/platform/api/quic_socket_address.h" | 33 #include "net/quic/platform/api/quic_socket_address.h" |
| 33 | 34 |
| 34 namespace net { | 35 namespace net { |
| 35 | 36 |
| 36 class CryptoHandshakeMessage; | 37 class CryptoHandshakeMessage; |
| 37 class EphemeralKeySource; | 38 class EphemeralKeySource; |
| 38 class KeyExchange; | 39 class KeyExchange; |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 // Does not own this observer. | 782 // Does not own this observer. |
| 782 RejectionObserver* rejection_observer_; | 783 RejectionObserver* rejection_observer_; |
| 783 | 784 |
| 784 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerConfig); | 785 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerConfig); |
| 785 }; | 786 }; |
| 786 | 787 |
| 787 struct NET_EXPORT_PRIVATE QuicSignedServerConfig | 788 struct NET_EXPORT_PRIVATE QuicSignedServerConfig |
| 788 : public base::RefCounted<QuicSignedServerConfig> { | 789 : public base::RefCounted<QuicSignedServerConfig> { |
| 789 QuicSignedServerConfig(); | 790 QuicSignedServerConfig(); |
| 790 | 791 |
| 791 // TODO(eranm): Have a QuicCryptoProof field instead of signature, cert_sct. | 792 QuicCryptoProof proof; |
| 792 std::string signature; | |
| 793 scoped_refptr<ProofSource::Chain> chain; | 793 scoped_refptr<ProofSource::Chain> chain; |
| 794 std::string cert_sct; | |
| 795 // The server config that is used for this proof (and the rest of the | 794 // The server config that is used for this proof (and the rest of the |
| 796 // request). | 795 // request). |
| 797 scoped_refptr<QuicCryptoServerConfig::Config> config; | 796 scoped_refptr<QuicCryptoServerConfig::Config> config; |
| 798 std::string primary_scid; | 797 std::string primary_scid; |
| 799 // Indication whether the Expect-CT header should be sent on the session | |
| 800 // this proof relates to (for background, see | |
| 801 // https://www.ietf.org/id/draft-stark-expect-ct-00.txt). | |
| 802 // NOTE: This field is intentionally independent from the |cert_sct| one | |
| 803 // and can be true even if |cert_sct| is empty. | |
| 804 // The goal of the Expect-CT header is uncover cases where valid SCTs are | |
| 805 // expected to be served, but aren't. | |
| 806 bool send_expect_ct_header; | |
| 807 | 798 |
| 808 private: | 799 private: |
| 809 friend class base::RefCounted<QuicSignedServerConfig>; | 800 friend class base::RefCounted<QuicSignedServerConfig>; |
| 810 virtual ~QuicSignedServerConfig(); | 801 virtual ~QuicSignedServerConfig(); |
| 811 }; | 802 }; |
| 812 | 803 |
| 813 } // namespace net | 804 } // namespace net |
| 814 | 805 |
| 815 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ | 806 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_ |
| OLD | NEW |