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 "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
(...skipping 29 matching lines...) Expand all Loading... | |
40 // than the number of round-trips needed for the handshake. | 40 // than the number of round-trips needed for the handshake. |
41 int num_sent_client_hellos() const; | 41 int num_sent_client_hellos() const; |
42 | 42 |
43 private: | 43 private: |
44 friend class test::CryptoTestUtils; | 44 friend class test::CryptoTestUtils; |
45 | 45 |
46 enum State { | 46 enum State { |
47 STATE_IDLE, | 47 STATE_IDLE, |
48 STATE_SEND_CHLO, | 48 STATE_SEND_CHLO, |
49 STATE_RECV_REJ, | 49 STATE_RECV_REJ, |
50 STATE_VERIFY_PROOF, | |
51 STATE_VERIFY_PROOF_COMPLETED, | |
wtc
2013/07/03 00:20:26
Nit: COMPLETED => COMPLETE
by our convention of s
ramant (doing other things)
2013/07/03 05:46:34
Done.
| |
50 STATE_RECV_SHLO, | 52 STATE_RECV_SHLO, |
51 }; | 53 }; |
52 | 54 |
53 // DoHandshakeLoop performs a step of the handshake state machine. Note that | 55 // DoHandshakeLoop performs a step of the handshake state machine. Note that |
54 // |in| is NULL for the first call. | 56 // |in| is NULL for the first call. |
wtc
2013/07/03 00:20:26
Nit: document the |result| argument.
ramant (doing other things)
2013/07/03 05:46:34
Done.
| |
55 void DoHandshakeLoop(const CryptoHandshakeMessage* in); | 57 void DoHandshakeLoop(const CryptoHandshakeMessage* in, int result); |
58 | |
59 void OnVerifyProofComplete(int result); | |
60 | |
61 base::WeakPtrFactory<QuicCryptoClientStream> weak_factory_; | |
56 | 62 |
57 State next_state_; | 63 State next_state_; |
58 // num_client_hellos_ contains the number of client hello messages that this | 64 // num_client_hellos_ contains the number of client hello messages that this |
59 // connection has sent. | 65 // connection has sent. |
60 int num_client_hellos_; | 66 int num_client_hellos_; |
61 | 67 |
62 QuicCryptoClientConfig* const crypto_config_; | 68 QuicCryptoClientConfig* const crypto_config_; |
63 | 69 |
64 // Client's connection nonce (4-byte timestamp + 28 random bytes) | 70 // Client's connection nonce (4-byte timestamp + 28 random bytes) |
65 std::string nonce_; | 71 std::string nonce_; |
66 // Server's hostname | 72 // Server's hostname |
67 std::string server_hostname_; | 73 std::string server_hostname_; |
68 | 74 |
75 // Generation counter from QuicCryptoClientConfig's CachedState. | |
76 uint64 generation_counter_; | |
77 | |
78 // Error details for ProofVerifier's VerifyProof call. | |
79 std::string error_details_; | |
80 | |
69 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); | 81 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); |
70 }; | 82 }; |
71 | 83 |
72 } // namespace net | 84 } // namespace net |
73 | 85 |
74 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 86 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
OLD | NEW |