| 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_server_stream.h" | 5 #include "net/quic/quic_crypto_server_stream.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "crypto/secure_hash.h" | 8 #include "crypto/secure_hash.h" |
| 9 #include "net/quic/crypto/crypto_protocol.h" | 9 #include "net/quic/crypto/crypto_protocol.h" |
| 10 #include "net/quic/crypto/crypto_utils.h" | 10 #include "net/quic/crypto/crypto_utils.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 handshake_confirmed_ = true; | 151 handshake_confirmed_ = true; |
| 152 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); | 152 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); |
| 153 | 153 |
| 154 // Now that the handshake is complete, send an updated server config and | 154 // Now that the handshake is complete, send an updated server config and |
| 155 // source-address token to the client. | 155 // source-address token to the client. |
| 156 SendServerConfigUpdate(NULL); | 156 SendServerConfigUpdate(NULL); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void QuicCryptoServerStream::SendServerConfigUpdate( | 159 void QuicCryptoServerStream::SendServerConfigUpdate( |
| 160 const CachedNetworkParameters* cached_network_params) { | 160 const CachedNetworkParameters* cached_network_params) { |
| 161 if (session()->connection()->version() <= QUIC_VERSION_21 || | 161 if (session()->connection()->version() <= QUIC_VERSION_21) { |
| 162 !handshake_confirmed_) { | |
| 163 return; | 162 return; |
| 164 } | 163 } |
| 165 | 164 |
| 166 CryptoHandshakeMessage server_config_update_message; | 165 CryptoHandshakeMessage server_config_update_message; |
| 167 if (!crypto_config_.BuildServerConfigUpdateMessage( | 166 if (!crypto_config_.BuildServerConfigUpdateMessage( |
| 168 session()->connection()->peer_address(), | 167 session()->connection()->peer_address(), |
| 169 session()->connection()->clock(), | 168 session()->connection()->clock(), |
| 170 session()->connection()->random_generator(), | 169 session()->connection()->random_generator(), |
| 171 crypto_negotiated_params_, | 170 crypto_negotiated_params_, |
| 172 cached_network_params, | 171 cached_network_params, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 245 |
| 247 void QuicCryptoServerStream::ValidateCallback::RunImpl( | 246 void QuicCryptoServerStream::ValidateCallback::RunImpl( |
| 248 const CryptoHandshakeMessage& client_hello, | 247 const CryptoHandshakeMessage& client_hello, |
| 249 const Result& result) { | 248 const Result& result) { |
| 250 if (parent_ != NULL) { | 249 if (parent_ != NULL) { |
| 251 parent_->FinishProcessingHandshakeMessage(client_hello, result); | 250 parent_->FinishProcessingHandshakeMessage(client_hello, result); |
| 252 } | 251 } |
| 253 } | 252 } |
| 254 | 253 |
| 255 } // namespace net | 254 } // namespace net |
| OLD | NEW |