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_PROOF_VERIFY, | |
51 STATE_PROOF_VERIFICATION_COMPLETED, | |
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. |
55 void DoHandshakeLoop(const CryptoHandshakeMessage* in); | 57 void DoHandshakeLoop(const CryptoHandshakeMessage* in, int result); |
58 | |
59 void VerifyProofCompleted(int result); | |
60 | |
61 base::WeakPtrFactory<QuicCryptoClientStream> weak_factory_; | |
agl2
2013/06/28 20:30:09
This code needs to work in google3 as well. I thin
ramant (doing other things)
2013/06/29 04:08:44
Will not port this CL back. Will use google3 API c
| |
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 |
69 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); | 75 DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream); |
70 }; | 76 }; |
71 | 77 |
72 } // namespace net | 78 } // namespace net |
73 | 79 |
74 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ | 80 #endif // NET_QUIC_QUIC_CRYPTO_CLIENT_STREAM_H_ |
OLD | NEW |