| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 return true; | 158 return true; |
| 159 } | 159 } |
| 160 | 160 |
| 161 QuicErrorCode QuicCryptoServerStream::ProcessClientHello( | 161 QuicErrorCode QuicCryptoServerStream::ProcessClientHello( |
| 162 const CryptoHandshakeMessage& message, | 162 const CryptoHandshakeMessage& message, |
| 163 const ValidateClientHelloResultCallback::Result& result, | 163 const ValidateClientHelloResultCallback::Result& result, |
| 164 CryptoHandshakeMessage* reply, | 164 CryptoHandshakeMessage* reply, |
| 165 string* error_details) { | 165 string* error_details) { |
| 166 return crypto_config_.ProcessClientHello( | 166 return crypto_config_.ProcessClientHello( |
| 167 result, | 167 result, |
| 168 session()->connection()->guid(), | 168 session()->connection()->connection_id(), |
| 169 session()->connection()->peer_address(), | 169 session()->connection()->peer_address(), |
| 170 session()->connection()->version(), | 170 session()->connection()->version(), |
| 171 session()->connection()->supported_versions(), | 171 session()->connection()->supported_versions(), |
| 172 session()->connection()->clock(), | 172 session()->connection()->clock(), |
| 173 session()->connection()->random_generator(), | 173 session()->connection()->random_generator(), |
| 174 &crypto_negotiated_params_, reply, error_details); | 174 &crypto_negotiated_params_, reply, error_details); |
| 175 } | 175 } |
| 176 | 176 |
| 177 QuicCryptoServerStream::ValidateCallback::ValidateCallback( | 177 QuicCryptoServerStream::ValidateCallback::ValidateCallback( |
| 178 QuicCryptoServerStream* parent) : parent_(parent) { | 178 QuicCryptoServerStream* parent) : parent_(parent) { |
| 179 } | 179 } |
| 180 | 180 |
| 181 void QuicCryptoServerStream::ValidateCallback::Cancel() { | 181 void QuicCryptoServerStream::ValidateCallback::Cancel() { |
| 182 parent_ = NULL; | 182 parent_ = NULL; |
| 183 } | 183 } |
| 184 | 184 |
| 185 void QuicCryptoServerStream::ValidateCallback::RunImpl( | 185 void QuicCryptoServerStream::ValidateCallback::RunImpl( |
| 186 const CryptoHandshakeMessage& client_hello, | 186 const CryptoHandshakeMessage& client_hello, |
| 187 const Result& result) { | 187 const Result& result) { |
| 188 if (parent_ != NULL) { | 188 if (parent_ != NULL) { |
| 189 parent_->FinishProcessingHandshakeMessage(client_hello, result); | 189 parent_->FinishProcessingHandshakeMessage(client_hello, result); |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace net | 193 } // namespace net |
| OLD | NEW |