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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 // is expected to be shared among servers with the domain suffix. If a server | 222 // is expected to be shared among servers with the domain suffix. If a server |
223 // matches this suffix, then the server config from another server with the | 223 // matches this suffix, then the server config from another server with the |
224 // suffix will be used to initialize the cached state for this server. | 224 // suffix will be used to initialize the cached state for this server. |
225 void AddCanonicalSuffix(const std::string& suffix); | 225 void AddCanonicalSuffix(const std::string& suffix); |
226 | 226 |
227 // Prefers AES-GCM (kAESG) over other AEAD algorithms. Call this method if | 227 // Prefers AES-GCM (kAESG) over other AEAD algorithms. Call this method if |
228 // the CPU has hardware acceleration for AES-GCM. This method can only be | 228 // the CPU has hardware acceleration for AES-GCM. This method can only be |
229 // called after SetDefaults(). | 229 // called after SetDefaults(). |
230 void PreferAesGcm(); | 230 void PreferAesGcm(); |
231 | 231 |
| 232 // Disables the use of ECDSA for proof verification. |
| 233 // Call this method on platforms that do not support ECDSA. |
| 234 // TODO(rch): remove this method when we drop support for Windows XP. |
| 235 void DisableEcdsa(); |
| 236 |
232 private: | 237 private: |
233 typedef std::map<QuicSessionKey, CachedState*> CachedStateMap; | 238 typedef std::map<QuicSessionKey, CachedState*> CachedStateMap; |
234 | 239 |
235 // If the suffix of the hostname in |server_key| is in |canoncial_suffixes_|, | 240 // If the suffix of the hostname in |server_key| is in |canoncial_suffixes_|, |
236 // then populate |cached| with the canonical cached state from | 241 // then populate |cached| with the canonical cached state from |
237 // |canonical_server_map_| for that suffix. | 242 // |canonical_server_map_| for that suffix. |
238 void PopulateFromCanonicalConfig(const QuicSessionKey& server_key, | 243 void PopulateFromCanonicalConfig(const QuicSessionKey& server_key, |
239 CachedState* cached); | 244 CachedState* cached); |
240 | 245 |
241 // cached_states_ maps from the server_key to the cached information about | 246 // cached_states_ maps from the server_key to the cached information about |
242 // that server. | 247 // that server. |
243 CachedStateMap cached_states_; | 248 CachedStateMap cached_states_; |
244 | 249 |
245 // Contains a map of servers which could share the same server config. Map | 250 // Contains a map of servers which could share the same server config. Map |
246 // from a canonical host suffix/port/scheme to a representative server with | 251 // from a canonical host suffix/port/scheme to a representative server with |
247 // the canonical suffix, which has a plausible set of initial certificates | 252 // the canonical suffix, which has a plausible set of initial certificates |
248 // (or at least server public key). | 253 // (or at least server public key). |
249 std::map<QuicSessionKey, QuicSessionKey> canonical_server_map_; | 254 std::map<QuicSessionKey, QuicSessionKey> canonical_server_map_; |
250 | 255 |
251 // Contains list of suffixes (for exmaple ".c.youtube.com", | 256 // Contains list of suffixes (for exmaple ".c.youtube.com", |
252 // ".googlevideo.com") of canoncial hostnames. | 257 // ".googlevideo.com") of canoncial hostnames. |
253 std::vector<std::string> canoncial_suffixes_; | 258 std::vector<std::string> canoncial_suffixes_; |
254 | 259 |
255 scoped_ptr<ProofVerifier> proof_verifier_; | 260 scoped_ptr<ProofVerifier> proof_verifier_; |
256 scoped_ptr<ChannelIDSigner> channel_id_signer_; | 261 scoped_ptr<ChannelIDSigner> channel_id_signer_; |
257 | 262 |
| 263 // True if ECDSA should be disabled. |
| 264 bool disable_ecdsa_; |
| 265 |
258 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 266 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
259 }; | 267 }; |
260 | 268 |
261 } // namespace net | 269 } // namespace net |
262 | 270 |
263 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 271 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
OLD | NEW |