OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_PROOF_SOURCE_H_ | 5 #ifndef NET_QUIC_CRYPTO_PROOF_SOURCE_H_ |
6 #define NET_QUIC_CRYPTO_PROOF_SOURCE_H_ | 6 #define NET_QUIC_CRYPTO_PROOF_SOURCE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // The signature uses SHA-256 as the hash function when the key is ECDSA. | 87 // The signature uses SHA-256 as the hash function when the key is ECDSA. |
88 // The signature may use an ECDSA key. | 88 // The signature may use an ECDSA key. |
89 // | 89 // |
90 // |out_chain| is reference counted to avoid the (assumed) expense of copying | 90 // |out_chain| is reference counted to avoid the (assumed) expense of copying |
91 // out the certificates. | 91 // out the certificates. |
92 // | 92 // |
93 // The number of certificate chains is expected to be small and fixed, thus | 93 // The number of certificate chains is expected to be small and fixed, thus |
94 // the ProofSource retains ownership of the contents of |out_chain|. The | 94 // the ProofSource retains ownership of the contents of |out_chain|. The |
95 // expectation is that they will be cached forever. | 95 // expectation is that they will be cached forever. |
96 // | 96 // |
97 // For version before QUIC_VERSION_30, the signature values should be cached | 97 // The signature depends on |chlo_hash| which means that the signature can not |
98 // because |server_config| will be somewhat static. However, since they aren't | 98 // be cached. The caller takes ownership of |*out_signature|. |
99 // bounded, the ProofSource may wish to evict entries from that cache, thus | |
100 // the caller takes ownership of |*out_signature|. | |
101 // | |
102 // For QUIC_VERSION_30 and later, the signature depends on |chlo_hash| | |
103 // which means that the signature can not be cached. The caller takes | |
104 // ownership of |*out_signature|. | |
105 // | 99 // |
106 // |hostname| may be empty to signify that a default certificate should be | 100 // |hostname| may be empty to signify that a default certificate should be |
107 // used. | 101 // used. |
108 // | 102 // |
109 // |out_leaf_cert_sct| points to the signed timestamp (RFC6962) of the leaf | 103 // |out_leaf_cert_sct| points to the signed timestamp (RFC6962) of the leaf |
110 // cert. | 104 // cert. |
111 // | 105 // |
112 // This function may be called concurrently. | 106 // This function may be called concurrently. |
113 virtual bool GetProof(const IPAddress& server_ip, | 107 virtual bool GetProof(const IPAddress& server_ip, |
114 const std::string& hostname, | 108 const std::string& hostname, |
(...skipping 12 matching lines...) Expand all Loading... |
127 const std::string& hostname, | 121 const std::string& hostname, |
128 const std::string& server_config, | 122 const std::string& server_config, |
129 QuicVersion quic_version, | 123 QuicVersion quic_version, |
130 base::StringPiece chlo_hash, | 124 base::StringPiece chlo_hash, |
131 std::unique_ptr<Callback> callback) = 0; | 125 std::unique_ptr<Callback> callback) = 0; |
132 }; | 126 }; |
133 | 127 |
134 } // namespace net | 128 } // namespace net |
135 | 129 |
136 #endif // NET_QUIC_CRYPTO_PROOF_SOURCE_H_ | 130 #endif // NET_QUIC_CRYPTO_PROOF_SOURCE_H_ |
OLD | NEW |