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/crypto/null_encrypter.h" | 9 #include "net/quic/crypto/null_encrypter.h" |
10 #include "net/quic/quic_client_session_base.h" | 10 #include "net/quic/quic_client_session_base.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 session()->connection()->clock()->WallNow(), | 151 session()->connection()->clock()->WallNow(), |
152 cached, | 152 cached, |
153 &crypto_negotiated_params_, | 153 &crypto_negotiated_params_, |
154 &error_details); | 154 &error_details); |
155 | 155 |
156 if (error != QUIC_NO_ERROR) { | 156 if (error != QUIC_NO_ERROR) { |
157 CloseConnectionWithDetails( | 157 CloseConnectionWithDetails( |
158 error, "Server config update invalid: " + error_details); | 158 error, "Server config update invalid: " + error_details); |
159 return; | 159 return; |
160 } | 160 } |
161 // Persist the new source address token and server config. | |
162 if (cached->proof_valid()) { | |
wtc
2014/07/31 00:43:06
If we have access to the proof verifier here, we s
ramant (doing other things)
2014/08/01 19:52:21
Base on internal CL: 71770356, it looks like we a
| |
163 client_session()->OnProofValid(*cached); | |
164 } | |
161 } | 165 } |
162 | 166 |
163 // kMaxClientHellos is the maximum number of times that we'll send a client | 167 // kMaxClientHellos is the maximum number of times that we'll send a client |
164 // hello. The value 3 accounts for: | 168 // hello. The value 3 accounts for: |
165 // * One failure due to an incorrect or missing source-address token. | 169 // * One failure due to an incorrect or missing source-address token. |
166 // * One failure due the server's certificate chain being unavailible and the | 170 // * One failure due the server's certificate chain being unavailible and the |
167 // server being unwilling to send it without a valid source-address token. | 171 // server being unwilling to send it without a valid source-address token. |
168 static const int kMaxClientHellos = 3; | 172 static const int kMaxClientHellos = 3; |
169 | 173 |
170 void QuicCryptoClientStream::DoHandshakeLoop( | 174 void QuicCryptoClientStream::DoHandshakeLoop( |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
509 } | 513 } |
510 } | 514 } |
511 return false; | 515 return false; |
512 } | 516 } |
513 | 517 |
514 QuicClientSessionBase* QuicCryptoClientStream::client_session() { | 518 QuicClientSessionBase* QuicCryptoClientStream::client_session() { |
515 return reinterpret_cast<QuicClientSessionBase*>(session()); | 519 return reinterpret_cast<QuicClientSessionBase*>(session()); |
516 } | 520 } |
517 | 521 |
518 } // namespace net | 522 } // namespace net |
OLD | NEW |