| 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/core/quic_crypto_server_stream.h" | 5 #include "net/quic/core/quic_crypto_server_stream.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "net/quic/core/crypto/crypto_protocol.h" | 9 #include "net/quic/core/crypto/crypto_protocol.h" |
| 10 #include "net/quic/core/crypto/crypto_utils.h" | 10 #include "net/quic/core/crypto/crypto_utils.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 return; | 136 return; |
| 137 } | 137 } |
| 138 | 138 |
| 139 if (message.tag() != kCHLO) { | 139 if (message.tag() != kCHLO) { |
| 140 CloseConnectionWithDetails(QUIC_INVALID_CRYPTO_MESSAGE_TYPE, | 140 CloseConnectionWithDetails(QUIC_INVALID_CRYPTO_MESSAGE_TYPE, |
| 141 "Handshake packet not CHLO"); | 141 "Handshake packet not CHLO"); |
| 142 return; | 142 return; |
| 143 } | 143 } |
| 144 | 144 |
| 145 if (validate_client_hello_cb_ != nullptr || | 145 if (validate_client_hello_cb_ != nullptr || |
| 146 (base::GetFlag(FLAGS_quic_reloadable_flag_fix_quic_callback_crash) && | 146 process_client_hello_cb_ != nullptr) { |
| 147 process_client_hello_cb_ != nullptr)) { | |
| 148 // Already processing some other handshake message. The protocol | 147 // Already processing some other handshake message. The protocol |
| 149 // does not allow for clients to send multiple handshake messages | 148 // does not allow for clients to send multiple handshake messages |
| 150 // before the server has a chance to respond. | 149 // before the server has a chance to respond. |
| 151 CloseConnectionWithDetails( | 150 CloseConnectionWithDetails( |
| 152 QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO, | 151 QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO, |
| 153 "Unexpected handshake message while processing CHLO"); | 152 "Unexpected handshake message while processing CHLO"); |
| 154 return; | 153 return; |
| 155 } | 154 } |
| 156 | 155 |
| 157 CryptoUtils::HashHandshakeMessage(message, &chlo_hash_, | 156 CryptoUtils::HashHandshakeMessage(message, &chlo_hash_, |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject( | 464 QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject( |
| 466 bool use_stateless_rejects) { | 465 bool use_stateless_rejects) { |
| 467 if (!use_stateless_rejects) { | 466 if (!use_stateless_rejects) { |
| 468 return 0; | 467 return 0; |
| 469 } | 468 } |
| 470 return helper_->GenerateConnectionIdForReject( | 469 return helper_->GenerateConnectionIdForReject( |
| 471 session()->connection()->connection_id()); | 470 session()->connection()->connection_id()); |
| 472 } | 471 } |
| 473 | 472 |
| 474 } // namespace net | 473 } // namespace net |
| OLD | NEW |