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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 const ChannelIDKey* channel_id_key, | 179 const ChannelIDKey* channel_id_key, |
180 QuicCryptoNegotiatedParameters* out_params, | 180 QuicCryptoNegotiatedParameters* out_params, |
181 CryptoHandshakeMessage* out, | 181 CryptoHandshakeMessage* out, |
182 std::string* error_details) const; | 182 std::string* error_details) const; |
183 | 183 |
184 // ProcessRejection processes a REJ message from a server and updates the | 184 // ProcessRejection processes a REJ message from a server and updates the |
185 // cached information about that server. After this, |IsComplete| may return | 185 // cached information about that server. After this, |IsComplete| may return |
186 // true for that server's CachedState. If the rejection message contains | 186 // true for that server's CachedState. If the rejection message contains |
187 // state about a future handshake (i.e. an nonce value from the server), then | 187 // state about a future handshake (i.e. an nonce value from the server), then |
188 // it will be saved in |out_params|. |now| is used to judge whether the | 188 // it will be saved in |out_params|. |now| is used to judge whether the |
189 // server config in the rejection message has expired. | 189 // server config in the rejection message has expired. |is_https| is used to |
| 190 // track reject reason for secure vs insecure QUIC. |
190 QuicErrorCode ProcessRejection(const CryptoHandshakeMessage& rej, | 191 QuicErrorCode ProcessRejection(const CryptoHandshakeMessage& rej, |
191 QuicWallTime now, | 192 QuicWallTime now, |
192 CachedState* cached, | 193 CachedState* cached, |
| 194 bool is_https, |
193 QuicCryptoNegotiatedParameters* out_params, | 195 QuicCryptoNegotiatedParameters* out_params, |
194 std::string* error_details); | 196 std::string* error_details); |
195 | 197 |
196 // ProcessServerHello processes the message in |server_hello|, updates the | 198 // ProcessServerHello processes the message in |server_hello|, updates the |
197 // cached information about that server, writes the negotiated parameters to | 199 // cached information about that server, writes the negotiated parameters to |
198 // |out_params| and returns QUIC_NO_ERROR. If |server_hello| is unacceptable | 200 // |out_params| and returns QUIC_NO_ERROR. If |server_hello| is unacceptable |
199 // then it puts an error message in |error_details| and returns an error | 201 // then it puts an error message in |error_details| and returns an error |
200 // code. |negotiated_versions| contains the list of version, if any, that were | 202 // code. |negotiated_versions| contains the list of version, if any, that were |
201 // present in a version negotiation packet previously recevied from the | 203 // present in a version negotiation packet previously recevied from the |
202 // server. The contents of this list will be compared against the list of | 204 // server. The contents of this list will be compared against the list of |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 308 |
307 // The |user_agent_id_| passed in QUIC's CHLO message. | 309 // The |user_agent_id_| passed in QUIC's CHLO message. |
308 std::string user_agent_id_; | 310 std::string user_agent_id_; |
309 | 311 |
310 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 312 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
311 }; | 313 }; |
312 | 314 |
313 } // namespace net | 315 } // namespace net |
314 | 316 |
315 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ | 317 #endif // NET_QUIC_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_ |
OLD | NEW |