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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 341 |
342 // ProcessServerHello processes the message in |server_hello|, writes the | 342 // ProcessServerHello processes the message in |server_hello|, writes the |
343 // negotiated parameters to |out_params| and returns QUIC_NO_ERROR. If | 343 // negotiated parameters to |out_params| and returns QUIC_NO_ERROR. If |
344 // |server_hello| is unacceptable then it puts an error message in | 344 // |server_hello| is unacceptable then it puts an error message in |
345 // |error_details| and returns an error code. | 345 // |error_details| and returns an error code. |
346 QuicErrorCode ProcessServerHello(const CryptoHandshakeMessage& server_hello, | 346 QuicErrorCode ProcessServerHello(const CryptoHandshakeMessage& server_hello, |
347 QuicGuid guid, | 347 QuicGuid guid, |
348 QuicCryptoNegotiatedParameters* out_params, | 348 QuicCryptoNegotiatedParameters* out_params, |
349 std::string* error_details); | 349 std::string* error_details); |
350 | 350 |
351 const ProofVerifier* proof_verifier() const; | 351 ProofVerifier* proof_verifier() const; |
352 | 352 |
353 // SetProofVerifier takes ownership of a |ProofVerifier| that clients are | 353 // SetProofVerifier takes ownership of a |ProofVerifier| that clients are |
354 // free to use in order to verify certificate chains from servers. If a | 354 // free to use in order to verify certificate chains from servers. If a |
355 // ProofVerifier is set then the client will request a certificate chain from | 355 // ProofVerifier is set then the client will request a certificate chain from |
356 // the server. | 356 // the server. |
357 void SetProofVerifier(ProofVerifier* verifier); | 357 void SetProofVerifier(ProofVerifier* verifier); |
358 | 358 |
359 ChannelIDSigner* channel_id_signer() const; | 359 ChannelIDSigner* channel_id_signer() const; |
360 | 360 |
361 // SetChannelIDSigner sets a ChannelIDSigner that will be called when the | 361 // SetChannelIDSigner sets a ChannelIDSigner that will be called when the |
362 // server supports channel IDs to sign a message proving possession of the | 362 // server supports channel IDs to sign a message proving possession of the |
363 // given ChannelID. This object takes ownership of |signer|. | 363 // given ChannelID. This object takes ownership of |signer|. |
364 void SetChannelIDSigner(ChannelIDSigner* signer); | 364 void SetChannelIDSigner(ChannelIDSigner* signer); |
365 | 365 |
366 private: | 366 private: |
367 // cached_states_ maps from the server hostname to the cached information | 367 // cached_states_ maps from the server hostname to the cached information |
368 // about that server. | 368 // about that server. |
369 std::map<std::string, CachedState*> cached_states_; | 369 std::map<std::string, CachedState*> cached_states_; |
370 | 370 |
371 scoped_ptr<ProofVerifier> proof_verifier_; | 371 scoped_ptr<ProofVerifier> proof_verifier_; |
372 scoped_ptr<ChannelIDSigner> channel_id_signer_; | 372 scoped_ptr<ChannelIDSigner> channel_id_signer_; |
373 | 373 |
374 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); | 374 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig); |
375 }; | 375 }; |
376 | 376 |
377 } // namespace net | 377 } // namespace net |
378 | 378 |
379 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ | 379 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_H_ |
OLD | NEW |