| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 void DisableEcdsa(); | 260 void DisableEcdsa(); |
| 261 | 261 |
| 262 // Saves the |user_agent_id| that will be passed in QUIC's CHLO message. | 262 // Saves the |user_agent_id| that will be passed in QUIC's CHLO message. |
| 263 void set_user_agent_id(const std::string& user_agent_id) { | 263 void set_user_agent_id(const std::string& user_agent_id) { |
| 264 user_agent_id_ = user_agent_id; | 264 user_agent_id_ = user_agent_id; |
| 265 } | 265 } |
| 266 | 266 |
| 267 private: | 267 private: |
| 268 typedef std::map<QuicServerId, CachedState*> CachedStateMap; | 268 typedef std::map<QuicServerId, CachedState*> CachedStateMap; |
| 269 | 269 |
| 270 // CacheNewServerConfig checks for SCFG, STK, and PROF tags in |message|, | 270 // CacheNewServerConfig checks for SCFG, STK, PROF, and CRT tags in |message|, |
| 271 // verifies them, and stores them in the cached state if they validate. | 271 // verifies them, and stores them in the cached state if they validate. |
| 272 // This is used on receipt of a REJ from a server, or when a server sends | 272 // This is used on receipt of a REJ from a server, or when a server sends |
| 273 // updated server config during a connection. | 273 // updated server config during a connection. |
| 274 QuicErrorCode CacheNewServerConfig(const CryptoHandshakeMessage& message, | 274 QuicErrorCode CacheNewServerConfig( |
| 275 QuicWallTime now, | 275 const CryptoHandshakeMessage& message, |
| 276 CachedState* cached, | 276 QuicWallTime now, |
| 277 QuicCryptoNegotiatedParameters* out_params, | 277 const std::vector<std::string>& cached_certs, |
| 278 std::string* error_details); | 278 CachedState* cached, |
| 279 std::string* error_details); |
| 279 | 280 |
| 280 // If the suffix of the hostname in |server_id| is in |canoncial_suffixes_|, | 281 // If the suffix of the hostname in |server_id| is in |canoncial_suffixes_|, |
| 281 // then populate |cached| with the canonical cached state from | 282 // then populate |cached| with the canonical cached state from |
| 282 // |canonical_server_map_| for that suffix. | 283 // |canonical_server_map_| for that suffix. |
| 283 void PopulateFromCanonicalConfig(const QuicServerId& server_id, | 284 void PopulateFromCanonicalConfig(const QuicServerId& server_id, |
| 284 CachedState* cached); | 285 CachedState* cached); |
| 285 | 286 |
| 286 // cached_states_ maps from the server_id to the cached information about | 287 // cached_states_ maps from the server_id to the cached information about |
| 287 // that server. | 288 // that server. |
| 288 CachedStateMap cached_states_; | 289 CachedStateMap cached_states_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 305 | 306 |
| 306 // The |user_agent_id_| passed in QUIC's CHLO message. | 307 // The |user_agent_id_| passed in QUIC's CHLO message. |
| 307 std::string user_agent_id_; | 308 std::string user_agent_id_; |
| 308 | 309 |
| 309 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 310 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
| 310 }; | 311 }; |
| 311 | 312 |
| 312 } // namespace net | 313 } // namespace net |
| 313 | 314 |
| 314 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 315 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
| OLD | NEW |