OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_CRYPTO_HANDSHAKE_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ |
6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 QuicCryptoNegotiatedParameters* out_params, | 345 QuicCryptoNegotiatedParameters* out_params, |
346 CryptoHandshakeMessage* out, | 346 CryptoHandshakeMessage* out, |
347 std::string* error_details) const; | 347 std::string* error_details) const; |
348 | 348 |
349 // ProcessRejection processes a REJ message from a server and updates the | 349 // ProcessRejection processes a REJ message from a server and updates the |
350 // cached information about that server. After this, |IsComplete| may return | 350 // cached information about that server. After this, |IsComplete| may return |
351 // true for that server's CachedState. If the rejection message contains | 351 // true for that server's CachedState. If the rejection message contains |
352 // state about a future handshake (i.e. an nonce value from the server), then | 352 // state about a future handshake (i.e. an nonce value from the server), then |
353 // it will be saved in |out_params|. |now| is used to judge whether the | 353 // it will be saved in |out_params|. |now| is used to judge whether the |
354 // server config in the rejection message has expired. | 354 // server config in the rejection message has expired. |
355 QuicErrorCode ProcessRejection(CachedState* cached, | 355 QuicErrorCode ProcessRejection(const CryptoHandshakeMessage& rej, |
356 const CryptoHandshakeMessage& rej, | |
357 QuicWallTime now, | 356 QuicWallTime now, |
| 357 CachedState* cached, |
358 QuicCryptoNegotiatedParameters* out_params, | 358 QuicCryptoNegotiatedParameters* out_params, |
359 std::string* error_details); | 359 std::string* error_details); |
360 | 360 |
361 // ProcessServerHello processes the message in |server_hello|, writes the | 361 // ProcessServerHello processes the message in |server_hello|, updates the |
362 // negotiated parameters to |out_params| and returns QUIC_NO_ERROR. If | 362 // cached information about that server, writes the negotiated parameters to |
363 // |server_hello| is unacceptable then it puts an error message in | 363 // |out_params| and returns QUIC_NO_ERROR. If |server_hello| is unacceptable |
364 // |error_details| and returns an error code. | 364 // then it puts an error message in |error_details| and returns an error |
| 365 // code. |
365 QuicErrorCode ProcessServerHello(const CryptoHandshakeMessage& server_hello, | 366 QuicErrorCode ProcessServerHello(const CryptoHandshakeMessage& server_hello, |
366 QuicGuid guid, | 367 QuicGuid guid, |
| 368 CachedState* cached, |
367 QuicCryptoNegotiatedParameters* out_params, | 369 QuicCryptoNegotiatedParameters* out_params, |
368 std::string* error_details); | 370 std::string* error_details); |
369 | 371 |
370 ProofVerifier* proof_verifier() const; | 372 ProofVerifier* proof_verifier() const; |
371 | 373 |
372 // SetProofVerifier takes ownership of a |ProofVerifier| that clients are | 374 // SetProofVerifier takes ownership of a |ProofVerifier| that clients are |
373 // free to use in order to verify certificate chains from servers. If a | 375 // free to use in order to verify certificate chains from servers. If a |
374 // ProofVerifier is set then the client will request a certificate chain from | 376 // ProofVerifier is set then the client will request a certificate chain from |
375 // the server. | 377 // the server. |
376 void SetProofVerifier(ProofVerifier* verifier); | 378 void SetProofVerifier(ProofVerifier* verifier); |
(...skipping 12 matching lines...) Expand all Loading... |
389 | 391 |
390 scoped_ptr<ProofVerifier> proof_verifier_; | 392 scoped_ptr<ProofVerifier> proof_verifier_; |
391 scoped_ptr<ChannelIDSigner> channel_id_signer_; | 393 scoped_ptr<ChannelIDSigner> channel_id_signer_; |
392 | 394 |
393 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 395 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
394 }; | 396 }; |
395 | 397 |
396 } // namespace net | 398 } // namespace net |
397 | 399 |
398 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ | 400 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ |
OLD | NEW |