| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 const QuicVersion preferred_version, | 154 const QuicVersion preferred_version, |
| 155 const CachedState* cached, | 155 const CachedState* cached, |
| 156 QuicCryptoNegotiatedParameters* out_params, | 156 QuicCryptoNegotiatedParameters* out_params, |
| 157 CryptoHandshakeMessage* out) const; | 157 CryptoHandshakeMessage* out) const; |
| 158 | 158 |
| 159 // FillClientHello sets |out| to be a CHLO message based on the configuration | 159 // FillClientHello sets |out| to be a CHLO message based on the configuration |
| 160 // of this object. This object must have cached enough information about | 160 // of this object. This object must have cached enough information about |
| 161 // the server's hostname in order to perform a handshake. This can be checked | 161 // the server's hostname in order to perform a handshake. This can be checked |
| 162 // with the |IsComplete| member of |CachedState|. | 162 // with the |IsComplete| member of |CachedState|. |
| 163 // | 163 // |
| 164 // |initial_flow_control_window_bytes| is the size of the initial flow | |
| 165 // control window this client will use for new streams. | |
| 166 // | |
| 167 // |now| and |rand| are used to generate the nonce and |out_params| is | 164 // |now| and |rand| are used to generate the nonce and |out_params| is |
| 168 // filled with the results of the handshake that the server is expected to | 165 // filled with the results of the handshake that the server is expected to |
| 169 // accept. |preferred_version| is the version of the QUIC protocol that this | 166 // accept. |preferred_version| is the version of the QUIC protocol that this |
| 170 // client chose to use initially. This allows the server to detect downgrade | 167 // client chose to use initially. This allows the server to detect downgrade |
| 171 // attacks. | 168 // attacks. |
| 172 // | 169 // |
| 173 // If |channel_id_key| is not null, it is used to sign a secret value derived | 170 // If |channel_id_key| is not null, it is used to sign a secret value derived |
| 174 // from the client and server's keys, and the Channel ID public key and the | 171 // from the client and server's keys, and the Channel ID public key and the |
| 175 // signature are placed in the CETV value of the CHLO. | 172 // signature are placed in the CETV value of the CHLO. |
| 176 QuicErrorCode FillClientHello(const QuicServerId& server_id, | 173 QuicErrorCode FillClientHello(const QuicServerId& server_id, |
| 177 QuicConnectionId connection_id, | 174 QuicConnectionId connection_id, |
| 178 const QuicVersion preferred_version, | 175 const QuicVersion preferred_version, |
| 179 uint32 initial_flow_control_window_bytes, | |
| 180 const CachedState* cached, | 176 const CachedState* cached, |
| 181 QuicWallTime now, | 177 QuicWallTime now, |
| 182 QuicRandom* rand, | 178 QuicRandom* rand, |
| 183 const ChannelIDKey* channel_id_key, | 179 const ChannelIDKey* channel_id_key, |
| 184 QuicCryptoNegotiatedParameters* out_params, | 180 QuicCryptoNegotiatedParameters* out_params, |
| 185 CryptoHandshakeMessage* out, | 181 CryptoHandshakeMessage* out, |
| 186 std::string* error_details) const; | 182 std::string* error_details) const; |
| 187 | 183 |
| 188 // ProcessRejection processes a REJ message from a server and updates the | 184 // ProcessRejection processes a REJ message from a server and updates the |
| 189 // cached information about that server. After this, |IsComplete| may return | 185 // cached information about that server. After this, |IsComplete| may return |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 283 |
| 288 // The |user_agent_id_| passed in QUIC's CHLO message. | 284 // The |user_agent_id_| passed in QUIC's CHLO message. |
| 289 std::string user_agent_id_; | 285 std::string user_agent_id_; |
| 290 | 286 |
| 291 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 287 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
| 292 }; | 288 }; |
| 293 | 289 |
| 294 } // namespace net | 290 } // namespace net |
| 295 | 291 |
| 296 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 292 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
| OLD | NEW |