| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 // Delete all CachedState objects from cached_states_. | 204 // Delete all CachedState objects from cached_states_. |
| 205 void ClearCachedStates(); | 205 void ClearCachedStates(); |
| 206 | 206 |
| 207 // FillInchoateClientHello sets |out| to be a CHLO message that elicits a | 207 // FillInchoateClientHello sets |out| to be a CHLO message that elicits a |
| 208 // source-address token or SCFG from a server. If |cached| is non-nullptr, the | 208 // source-address token or SCFG from a server. If |cached| is non-nullptr, the |
| 209 // source-address token will be taken from it. |out_params| is used in order | 209 // source-address token will be taken from it. |out_params| is used in order |
| 210 // to store the cached certs that were sent as hints to the server in | 210 // to store the cached certs that were sent as hints to the server in |
| 211 // |out_params->cached_certs|. |preferred_version| is the version of the | 211 // |out_params->cached_certs|. |preferred_version| is the version of the |
| 212 // QUIC protocol that this client chose to use initially. This allows the | 212 // QUIC protocol that this client chose to use initially. This allows the |
| 213 // server to detect downgrade attacks. | 213 // server to detect downgrade attacks. If |demand_x509_proof| is true, |
| 214 // then |out| will include an X509 proof demand, and the associated |
| 215 // certificate related fields. |
| 214 void FillInchoateClientHello(const QuicServerId& server_id, | 216 void FillInchoateClientHello(const QuicServerId& server_id, |
| 215 const QuicVersion preferred_version, | 217 const QuicVersion preferred_version, |
| 216 const CachedState* cached, | 218 const CachedState* cached, |
| 217 QuicRandom* rand, | 219 QuicRandom* rand, |
| 220 bool demand_x509_proof, |
| 218 QuicCryptoNegotiatedParameters* out_params, | 221 QuicCryptoNegotiatedParameters* out_params, |
| 219 CryptoHandshakeMessage* out) const; | 222 CryptoHandshakeMessage* out) const; |
| 220 | 223 |
| 221 // FillClientHello sets |out| to be a CHLO message based on the configuration | 224 // FillClientHello sets |out| to be a CHLO message based on the configuration |
| 222 // of this object. This object must have cached enough information about | 225 // of this object. This object must have cached enough information about |
| 223 // the server's hostname in order to perform a handshake. This can be checked | 226 // the server's hostname in order to perform a handshake. This can be checked |
| 224 // with the |IsComplete| member of |CachedState|. | 227 // with the |IsComplete| member of |CachedState|. |
| 225 // | 228 // |
| 226 // |now| and |rand| are used to generate the nonce and |out_params| is | 229 // |now| and |rand| are used to generate the nonce and |out_params| is |
| 227 // filled with the results of the handshake that the server is expected to | 230 // filled with the results of the handshake that the server is expected to |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 378 |
| 376 // The |user_agent_id_| passed in QUIC's CHLO message. | 379 // The |user_agent_id_| passed in QUIC's CHLO message. |
| 377 std::string user_agent_id_; | 380 std::string user_agent_id_; |
| 378 | 381 |
| 379 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 382 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
| 380 }; | 383 }; |
| 381 | 384 |
| 382 } // namespace net | 385 } // namespace net |
| 383 | 386 |
| 384 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 387 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
| OLD | NEW |