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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
238 // Prefers AES-GCM (kAESG) over other AEAD algorithms. Call this method if | 238 // Prefers AES-GCM (kAESG) over other AEAD algorithms. Call this method if |
239 // the CPU has hardware acceleration for AES-GCM. This method can only be | 239 // the CPU has hardware acceleration for AES-GCM. This method can only be |
240 // called after SetDefaults(). | 240 // called after SetDefaults(). |
241 void PreferAesGcm(); | 241 void PreferAesGcm(); |
242 | 242 |
243 // Disables the use of ECDSA for proof verification. | 243 // Disables the use of ECDSA for proof verification. |
244 // Call this method on platforms that do not support ECDSA. | 244 // Call this method on platforms that do not support ECDSA. |
245 // TODO(rch): remove this method when we drop support for Windows XP. | 245 // TODO(rch): remove this method when we drop support for Windows XP. |
246 void DisableEcdsa(); | 246 void DisableEcdsa(); |
247 | 247 |
248 // Saves the client version that will be passed in QUIC's CHLO message. | |
249 void set_client_version(const std::string& client_version) { | |
Ryan Hamilton
2014/06/05 14:12:15
I'm still not enamored of "version". It makes me t
ramant (doing other things)
2014/06/05 17:07:49
jar suggested UAID. Changed all the code to use us
| |
250 client_version_ = client_version; | |
251 } | |
252 | |
248 private: | 253 private: |
249 typedef std::map<QuicServerId, CachedState*> CachedStateMap; | 254 typedef std::map<QuicServerId, CachedState*> CachedStateMap; |
250 | 255 |
251 // If the suffix of the hostname in |server_id| is in |canoncial_suffixes_|, | 256 // If the suffix of the hostname in |server_id| is in |canoncial_suffixes_|, |
252 // then populate |cached| with the canonical cached state from | 257 // then populate |cached| with the canonical cached state from |
253 // |canonical_server_map_| for that suffix. | 258 // |canonical_server_map_| for that suffix. |
254 void PopulateFromCanonicalConfig(const QuicServerId& server_id, | 259 void PopulateFromCanonicalConfig(const QuicServerId& server_id, |
255 CachedState* cached); | 260 CachedState* cached); |
256 | 261 |
257 // cached_states_ maps from the server_id to the cached information about | 262 // cached_states_ maps from the server_id to the cached information about |
258 // that server. | 263 // that server. |
259 CachedStateMap cached_states_; | 264 CachedStateMap cached_states_; |
260 | 265 |
261 // Contains a map of servers which could share the same server config. Map | 266 // Contains a map of servers which could share the same server config. Map |
262 // from a canonical host suffix/port/scheme to a representative server with | 267 // from a canonical host suffix/port/scheme to a representative server with |
263 // the canonical suffix, which has a plausible set of initial certificates | 268 // the canonical suffix, which has a plausible set of initial certificates |
264 // (or at least server public key). | 269 // (or at least server public key). |
265 std::map<QuicServerId, QuicServerId> canonical_server_map_; | 270 std::map<QuicServerId, QuicServerId> canonical_server_map_; |
266 | 271 |
267 // Contains list of suffixes (for exmaple ".c.youtube.com", | 272 // Contains list of suffixes (for exmaple ".c.youtube.com", |
268 // ".googlevideo.com") of canoncial hostnames. | 273 // ".googlevideo.com") of canoncial hostnames. |
269 std::vector<std::string> canoncial_suffixes_; | 274 std::vector<std::string> canoncial_suffixes_; |
270 | 275 |
271 scoped_ptr<ProofVerifier> proof_verifier_; | 276 scoped_ptr<ProofVerifier> proof_verifier_; |
272 scoped_ptr<ChannelIDSource> channel_id_source_; | 277 scoped_ptr<ChannelIDSource> channel_id_source_; |
273 | 278 |
274 // True if ECDSA should be disabled. | 279 // True if ECDSA should be disabled. |
275 bool disable_ecdsa_; | 280 bool disable_ecdsa_; |
276 | 281 |
282 // Client version that is passed in QUIC's CHLO message. | |
283 std::string client_version_; | |
284 | |
277 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 285 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
278 }; | 286 }; |
279 | 287 |
280 } // namespace net | 288 } // namespace net |
281 | 289 |
282 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 290 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
OLD | NEW |