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_CLIENT_CONFIG_H_ | 5 #ifndef NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
6 #define NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 6 #define NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 bool has_server_nonce() const; | 141 bool has_server_nonce() const; |
142 | 142 |
143 // This function should only be called when has_server_nonce is true. | 143 // This function should only be called when has_server_nonce is true. |
144 // Returns the next server_nonce specified by the server and removes it | 144 // Returns the next server_nonce specified by the server and removes it |
145 // from the queue of nonces. | 145 // from the queue of nonces. |
146 std::string GetNextServerNonce(); | 146 std::string GetNextServerNonce(); |
147 | 147 |
148 // SetProofVerifyDetails takes ownership of |details|. | 148 // SetProofVerifyDetails takes ownership of |details|. |
149 void SetProofVerifyDetails(ProofVerifyDetails* details); | 149 void SetProofVerifyDetails(ProofVerifyDetails* details); |
150 | 150 |
151 // Copy the |server_config_|, |source_address_token_|, |certs_| and | 151 // Copy the |server_config_|, |source_address_token_|, |certs_|, |
152 // |server_config_sig_| from the |other|. The remaining fields, | 152 // |cert_sct_|, |chlo_hash_| and |server_config_sig_| from the |other|. The |
153 // |generation_counter_|, |proof_verify_details_|, and |scfg_| remain | 153 // remaining fields, |generation_counter_|, |proof_verify_details_|, and |
154 // unchanged. | 154 // |scfg_| remain unchanged. |
155 void InitializeFrom(const CachedState& other); | 155 void InitializeFrom(const CachedState& other); |
156 | 156 |
157 // Initializes this cached state based on the arguments provided. | 157 // Initializes this cached state based on the arguments provided. |
158 // Returns false if there is a problem parsing the server config. | 158 // Returns false if there is a problem parsing the server config. |
159 bool Initialize(base::StringPiece server_config, | 159 bool Initialize(base::StringPiece server_config, |
160 base::StringPiece source_address_token, | 160 base::StringPiece source_address_token, |
161 const std::vector<std::string>& certs, | 161 const std::vector<std::string>& certs, |
162 const std::string& cert_sct, | 162 base::StringPiece cert_sct, |
163 base::StringPiece chlo_hash, | 163 base::StringPiece chlo_hash, |
164 base::StringPiece signature, | 164 base::StringPiece signature, |
165 QuicWallTime now); | 165 QuicWallTime now); |
166 | 166 |
167 private: | 167 private: |
168 std::string server_config_; // A serialized handshake message. | 168 std::string server_config_; // A serialized handshake message. |
169 std::string source_address_token_; // An opaque proof of IP ownership. | 169 std::string source_address_token_; // An opaque proof of IP ownership. |
170 std::vector<std::string> certs_; // A list of certificates in leaf-first | 170 std::vector<std::string> certs_; // A list of certificates in leaf-first |
171 // order. | 171 // order. |
172 std::string cert_sct_; // Signed timestamp of the leaf cert. | 172 std::string cert_sct_; // Signed timestamp of the leaf cert. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 // The |user_agent_id_| passed in QUIC's CHLO message. | 375 // The |user_agent_id_| passed in QUIC's CHLO message. |
376 std::string user_agent_id_; | 376 std::string user_agent_id_; |
377 | 377 |
378 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 378 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
379 }; | 379 }; |
380 | 380 |
381 } // namespace net | 381 } // namespace net |
382 | 382 |
383 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 383 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
OLD | NEW |