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 #include "net/quic/quic_crypto_client_stream.h" | 5 #include "net/quic/quic_crypto_client_stream.h" |
6 | 6 |
7 #include "net/quic/crypto/crypto_protocol.h" | 7 #include "net/quic/crypto/crypto_protocol.h" |
8 #include "net/quic/crypto/crypto_utils.h" | 8 #include "net/quic/crypto/crypto_utils.h" |
9 #include "net/quic/quic_protocol.h" | 9 #include "net/quic/quic_protocol.h" |
10 #include "net/quic/quic_session.h" | 10 #include "net/quic/quic_session.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const QuicNegotiatedParameters& | 42 const QuicNegotiatedParameters& |
43 QuicCryptoClientStream::negotiated_params() const { | 43 QuicCryptoClientStream::negotiated_params() const { |
44 return negotiated_params_; | 44 return negotiated_params_; |
45 } | 45 } |
46 | 46 |
47 const QuicCryptoNegotiatedParameters& | 47 const QuicCryptoNegotiatedParameters& |
48 QuicCryptoClientStream::crypto_negotiated_params() const { | 48 QuicCryptoClientStream::crypto_negotiated_params() const { |
49 return crypto_negotiated_params_; | 49 return crypto_negotiated_params_; |
50 } | 50 } |
51 | 51 |
| 52 int QuicCryptoClientStream::num_sent_client_hellos() const { |
| 53 return num_client_hellos_; |
| 54 } |
| 55 |
52 // kMaxClientHellos is the maximum number of times that we'll send a client | 56 // kMaxClientHellos is the maximum number of times that we'll send a client |
53 // hello. The value 3 accounts for: | 57 // hello. The value 3 accounts for: |
54 // * One failure due to an incorrect or missing source-address token. | 58 // * One failure due to an incorrect or missing source-address token. |
55 // * One failure due the server's certificate chain being unavailible and the | 59 // * One failure due the server's certificate chain being unavailible and the |
56 // server being unwilling to send it without a valid source-address token. | 60 // server being unwilling to send it without a valid source-address token. |
57 static const int kMaxClientHellos = 3; | 61 static const int kMaxClientHellos = 3; |
58 | 62 |
59 void QuicCryptoClientStream::DoHandshakeLoop( | 63 void QuicCryptoClientStream::DoHandshakeLoop( |
60 const CryptoHandshakeMessage* in) { | 64 const CryptoHandshakeMessage* in) { |
61 CryptoHandshakeMessage out; | 65 CryptoHandshakeMessage out; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 return; | 170 return; |
167 case STATE_IDLE: | 171 case STATE_IDLE: |
168 // This means that the peer sent us a message that we weren't expecting. | 172 // This means that the peer sent us a message that we weren't expecting. |
169 CloseConnection(QUIC_INVALID_CRYPTO_MESSAGE_TYPE); | 173 CloseConnection(QUIC_INVALID_CRYPTO_MESSAGE_TYPE); |
170 return; | 174 return; |
171 } | 175 } |
172 } | 176 } |
173 } | 177 } |
174 | 178 |
175 } // namespace net | 179 } // namespace net |
OLD | NEW |