| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // perform a handshake, or we sent a full hello that the server | 281 // perform a handshake, or we sent a full hello that the server |
| 282 // rejected. Here we hope to have a REJ that contains the information | 282 // rejected. Here we hope to have a REJ that contains the information |
| 283 // that we need. | 283 // that we need. |
| 284 if (in->tag() != kREJ) { | 284 if (in->tag() != kREJ) { |
| 285 CloseConnectionWithDetails(QUIC_INVALID_CRYPTO_MESSAGE_TYPE, | 285 CloseConnectionWithDetails(QUIC_INVALID_CRYPTO_MESSAGE_TYPE, |
| 286 "Expected REJ"); | 286 "Expected REJ"); |
| 287 return; | 287 return; |
| 288 } | 288 } |
| 289 error = crypto_config_->ProcessRejection( | 289 error = crypto_config_->ProcessRejection( |
| 290 *in, session()->connection()->clock()->WallNow(), cached, | 290 *in, session()->connection()->clock()->WallNow(), cached, |
| 291 &crypto_negotiated_params_, &error_details); | 291 server_id_.is_https(), &crypto_negotiated_params_, &error_details); |
| 292 if (error != QUIC_NO_ERROR) { | 292 if (error != QUIC_NO_ERROR) { |
| 293 CloseConnectionWithDetails(error, error_details); | 293 CloseConnectionWithDetails(error, error_details); |
| 294 return; | 294 return; |
| 295 } | 295 } |
| 296 if (!cached->proof_valid()) { | 296 if (!cached->proof_valid()) { |
| 297 if (!server_id_.is_https()) { | 297 if (!server_id_.is_https()) { |
| 298 // We don't check the certificates for insecure QUIC connections. | 298 // We don't check the certificates for insecure QUIC connections. |
| 299 SetCachedProofValid(cached); | 299 SetCachedProofValid(cached); |
| 300 } else if (!cached->signature().empty()) { | 300 } else if (!cached->signature().empty()) { |
| 301 next_state_ = STATE_VERIFY_PROOF; | 301 next_state_ = STATE_VERIFY_PROOF; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 } | 500 } |
| 501 } | 501 } |
| 502 return false; | 502 return false; |
| 503 } | 503 } |
| 504 | 504 |
| 505 QuicClientSessionBase* QuicCryptoClientStream::client_session() { | 505 QuicClientSessionBase* QuicCryptoClientStream::client_session() { |
| 506 return reinterpret_cast<QuicClientSessionBase*>(session()); | 506 return reinterpret_cast<QuicClientSessionBase*>(session()); |
| 507 } | 507 } |
| 508 | 508 |
| 509 } // namespace net | 509 } // namespace net |
| OLD | NEW |