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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 CryptoHandshakeMessage server_config_update_message; | 163 CryptoHandshakeMessage server_config_update_message; |
164 if (!crypto_config_.BuildServerConfigUpdateMessage( | 164 if (!crypto_config_.BuildServerConfigUpdateMessage( |
165 session()->connection()->peer_address(), | 165 session()->connection()->peer_address(), |
166 session()->connection()->clock(), | 166 session()->connection()->clock(), |
167 session()->connection()->random_generator(), | 167 session()->connection()->random_generator(), |
168 crypto_negotiated_params_, &server_config_update_message)) { | 168 crypto_negotiated_params_, &server_config_update_message)) { |
169 DVLOG(1) << "Server: Failed to build server config update (SCUP)!"; | 169 DVLOG(1) << "Server: Failed to build server config update (SCUP)!"; |
170 return; | 170 return; |
171 } | 171 } |
172 | 172 |
173 DVLOG(1) << "Server: Sending server config update (SCUP): " | 173 DVLOG(1) << "Server: Sending server config update: " |
174 << server_config_update_message.DebugString(); | 174 << server_config_update_message.DebugString(); |
175 const QuicData& data = server_config_update_message.GetSerialized(); | 175 const QuicData& data = server_config_update_message.GetSerialized(); |
176 WriteOrBufferData(string(data.data(), data.length()), false, NULL); | 176 WriteOrBufferData(string(data.data(), data.length()), false, NULL); |
177 | 177 |
178 ++num_server_config_update_messages_sent_; | 178 ++num_server_config_update_messages_sent_; |
179 } | 179 } |
180 | 180 |
181 void QuicCryptoServerStream::OnServerHelloAcked() { | 181 void QuicCryptoServerStream::OnServerHelloAcked() { |
182 session()->connection()->OnHandshakeComplete(); | 182 session()->connection()->OnHandshakeComplete(); |
183 } | 183 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 void QuicCryptoServerStream::ValidateCallback::RunImpl( | 242 void QuicCryptoServerStream::ValidateCallback::RunImpl( |
243 const CryptoHandshakeMessage& client_hello, | 243 const CryptoHandshakeMessage& client_hello, |
244 const Result& result) { | 244 const Result& result) { |
245 if (parent_ != NULL) { | 245 if (parent_ != NULL) { |
246 parent_->FinishProcessingHandshakeMessage(client_hello, result); | 246 parent_->FinishProcessingHandshakeMessage(client_hello, result); |
247 } | 247 } |
248 } | 248 } |
249 | 249 |
250 } // namespace net | 250 } // namespace net |
OLD | NEW |