OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUIC_CRYPTO_CLIENT_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 6 #define NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "net/cert/cert_verify_result.h" | 12 #include "net/cert/cert_verify_result.h" |
13 #include "net/cert/x509_certificate.h" | 13 #include "net/cert/x509_certificate.h" |
14 #include "net/quic/crypto/proof_verifier.h" | 14 #include "net/quic/crypto/proof_verifier.h" |
15 #include "net/quic/crypto/quic_crypto_client_config.h" | 15 #include "net/quic/crypto/quic_crypto_client_config.h" |
16 #include "net/quic/quic_config.h" | 16 #include "net/quic/quic_config.h" |
17 #include "net/quic/quic_crypto_stream.h" | 17 #include "net/quic/quic_crypto_stream.h" |
18 #include "net/quic/quic_session_key.h" | |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 | 21 |
21 class ProofVerifyDetails; | 22 class ProofVerifyDetails; |
22 class QuicSession; | 23 class QuicSession; |
23 class SSLInfo; | 24 class SSLInfo; |
24 | 25 |
25 namespace test { | 26 namespace test { |
26 class CryptoTestUtils; | 27 class CryptoTestUtils; |
27 } // namespace test | 28 } // namespace test |
28 | 29 |
29 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream { | 30 class NET_EXPORT_PRIVATE QuicCryptoClientStream : public QuicCryptoStream { |
30 public: | 31 public: |
31 QuicCryptoClientStream(const string& server_hostname, | 32 QuicCryptoClientStream(const QuicSessionKey& session_key, |
32 QuicSession* session, | 33 QuicSession* session, |
33 QuicCryptoClientConfig* crypto_config); | 34 QuicCryptoClientConfig* crypto_config); |
34 virtual ~QuicCryptoClientStream(); | 35 virtual ~QuicCryptoClientStream(); |
35 | 36 |
36 // CryptoFramerVisitorInterface implementation | 37 // CryptoFramerVisitorInterface implementation |
37 virtual void OnHandshakeMessage( | 38 virtual void OnHandshakeMessage( |
38 const CryptoHandshakeMessage& message) OVERRIDE; | 39 const CryptoHandshakeMessage& message) OVERRIDE; |
39 | 40 |
40 // Performs a crypto handshake with the server. Returns true if the crypto | 41 // Performs a crypto handshake with the server. Returns true if the crypto |
41 // handshake is started successfully. | 42 // handshake is started successfully. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 | 106 |
106 State next_state_; | 107 State next_state_; |
107 // num_client_hellos_ contains the number of client hello messages that this | 108 // num_client_hellos_ contains the number of client hello messages that this |
108 // connection has sent. | 109 // connection has sent. |
109 int num_client_hellos_; | 110 int num_client_hellos_; |
110 | 111 |
111 QuicCryptoClientConfig* const crypto_config_; | 112 QuicCryptoClientConfig* const crypto_config_; |
112 | 113 |
113 // Client's connection nonce (4-byte timestamp + 28 random bytes) | 114 // Client's connection nonce (4-byte timestamp + 28 random bytes) |
114 std::string nonce_; | 115 std::string nonce_; |
115 // Server's hostname | 116 // Server's (is_https, hostname, port) tuple. |
wtc
2014/03/13 22:22:03
Nit: same here -- might be better to list is_https
ramant (doing other things)
2014/03/13 23:46:36
Done.
| |
116 std::string server_hostname_; | 117 const QuicSessionKey session_key_; |
117 | 118 |
118 // Generation counter from QuicCryptoClientConfig's CachedState. | 119 // Generation counter from QuicCryptoClientConfig's CachedState. |
119 uint64 generation_counter_; | 120 uint64 generation_counter_; |
120 | 121 |
121 // proof_verify_callback_ contains the callback object that we passed to an | 122 // proof_verify_callback_ contains the callback object that we passed to an |
122 // asynchronous proof verification. The ProofVerifier owns this object. | 123 // asynchronous proof verification. The ProofVerifier owns this object. |
123 ProofVerifierCallbackImpl* proof_verify_callback_; | 124 ProofVerifierCallbackImpl* proof_verify_callback_; |
124 | 125 |
125 // These members are used to store the result of an asynchronous proof | 126 // These members are used to store the result of an asynchronous proof |
126 // verification. These members must not be used after | 127 // verification. These members must not be used after |
(...skipping 14 matching lines...) Expand all Loading... | |
141 base::TimeTicks disk_cache_load_start_time_; | 142 base::TimeTicks disk_cache_load_start_time_; |
142 | 143 |
143 base::WeakPtrFactory<QuicCryptoClientStream> weak_factory_; | 144 base::WeakPtrFactory<QuicCryptoClientStream> weak_factory_; |
144 | 145 |
145 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); | 146 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); |
146 }; | 147 }; |
147 | 148 |
148 } // namespace net | 149 } // namespace net |
149 | 150 |
150 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 151 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
OLD | NEW |