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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // verifies them, and stores them in the cached state if they validate. | 273 // verifies them, and stores them in the cached state if they validate. |
274 // This is used on receipt of a REJ from a server, or when a server sends | 274 // This is used on receipt of a REJ from a server, or when a server sends |
275 // updated server config during a connection. | 275 // updated server config during a connection. |
276 QuicErrorCode CacheNewServerConfig( | 276 QuicErrorCode CacheNewServerConfig( |
277 const CryptoHandshakeMessage& message, | 277 const CryptoHandshakeMessage& message, |
278 QuicWallTime now, | 278 QuicWallTime now, |
279 const std::vector<std::string>& cached_certs, | 279 const std::vector<std::string>& cached_certs, |
280 CachedState* cached, | 280 CachedState* cached, |
281 std::string* error_details); | 281 std::string* error_details); |
282 | 282 |
283 // If the suffix of the hostname in |server_id| is in |canoncial_suffixes_|, | 283 // If the suffix of the hostname in |server_id| is in |canonical_suffixes_|, |
284 // then populate |cached| with the canonical cached state from | 284 // then populate |cached| with the canonical cached state from |
285 // |canonical_server_map_| for that suffix. | 285 // |canonical_server_map_| for that suffix. |
286 void PopulateFromCanonicalConfig(const QuicServerId& server_id, | 286 void PopulateFromCanonicalConfig(const QuicServerId& server_id, |
287 CachedState* cached); | 287 CachedState* cached); |
288 | 288 |
289 // cached_states_ maps from the server_id to the cached information about | 289 // cached_states_ maps from the server_id to the cached information about |
290 // that server. | 290 // that server. |
291 CachedStateMap cached_states_; | 291 CachedStateMap cached_states_; |
292 | 292 |
293 // Contains a map of servers which could share the same server config. Map | 293 // Contains a map of servers which could share the same server config. Map |
294 // from a canonical host suffix/port/scheme to a representative server with | 294 // from a canonical host suffix/port/scheme to a representative server with |
295 // the canonical suffix, which has a plausible set of initial certificates | 295 // the canonical suffix, which has a plausible set of initial certificates |
296 // (or at least server public key). | 296 // (or at least server public key). |
297 std::map<QuicServerId, QuicServerId> canonical_server_map_; | 297 std::map<QuicServerId, QuicServerId> canonical_server_map_; |
298 | 298 |
299 // Contains list of suffixes (for exmaple ".c.youtube.com", | 299 // Contains list of suffixes (for exmaple ".c.youtube.com", |
300 // ".googlevideo.com") of canoncial hostnames. | 300 // ".googlevideo.com") of canonical hostnames. |
301 std::vector<std::string> canoncial_suffixes_; | 301 std::vector<std::string> canonical_suffixes_; |
302 | 302 |
303 scoped_ptr<ProofVerifier> proof_verifier_; | 303 scoped_ptr<ProofVerifier> proof_verifier_; |
304 scoped_ptr<ChannelIDSource> channel_id_source_; | 304 scoped_ptr<ChannelIDSource> channel_id_source_; |
305 | 305 |
306 // True if ECDSA should be disabled. | 306 // True if ECDSA should be disabled. |
307 bool disable_ecdsa_; | 307 bool disable_ecdsa_; |
308 | 308 |
309 // The |user_agent_id_| passed in QUIC's CHLO message. | 309 // The |user_agent_id_| passed in QUIC's CHLO message. |
310 std::string user_agent_id_; | 310 std::string user_agent_id_; |
311 | 311 |
312 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 312 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
313 }; | 313 }; |
314 | 314 |
315 } // namespace net | 315 } // namespace net |
316 | 316 |
317 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 317 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
OLD | NEW |