| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "crypto/secure_hash.h" | 10 #include "crypto/secure_hash.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 send_server_config_update_cb_->Cancel(); | 107 send_server_config_update_cb_->Cancel(); |
| 108 send_server_config_update_cb_ = nullptr; | 108 send_server_config_update_cb_ = nullptr; |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 void QuicCryptoServerStream::OnHandshakeMessage( | 112 void QuicCryptoServerStream::OnHandshakeMessage( |
| 113 const CryptoHandshakeMessage& message) { | 113 const CryptoHandshakeMessage& message) { |
| 114 QuicCryptoServerStreamBase::OnHandshakeMessage(message); | 114 QuicCryptoServerStreamBase::OnHandshakeMessage(message); |
| 115 ++num_handshake_messages_; | 115 ++num_handshake_messages_; |
| 116 | 116 |
| 117 // It's only safe to deprecate kFIXD where we have deprecated v25 | 117 bool require_kfixd = !FLAGS_quic_deprecate_kfixd; |
| 118 bool require_kfixd = | |
| 119 !FLAGS_quic_deprecate_kfixd || !FLAGS_quic_disable_pre_30; | |
| 120 | 118 |
| 121 if (require_kfixd && !HasFixedTag(message)) { | 119 if (require_kfixd && !HasFixedTag(message)) { |
| 122 CloseConnectionWithDetails(QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND, | 120 CloseConnectionWithDetails(QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND, |
| 123 "Missing kFIXD"); | 121 "Missing kFIXD"); |
| 124 return; | 122 return; |
| 125 } | 123 } |
| 126 | 124 |
| 127 // Do not process handshake messages after the handshake is confirmed. | 125 // Do not process handshake messages after the handshake is confirmed. |
| 128 if (handshake_confirmed_) { | 126 if (handshake_confirmed_) { |
| 129 CloseConnectionWithDetails(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, | 127 CloseConnectionWithDetails(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject( | 479 QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject( |
| 482 QuicConnectionId connection_id) { | 480 QuicConnectionId connection_id) { |
| 483 // TODO(rch): Remove this method when | 481 // TODO(rch): Remove this method when |
| 484 // reloadable_flag_quic_dispatcher_creates_id2 is removed. | 482 // reloadable_flag_quic_dispatcher_creates_id2 is removed. |
| 485 QuicServerSessionBase* session_base = | 483 QuicServerSessionBase* session_base = |
| 486 static_cast<QuicServerSessionBase*>(session()); | 484 static_cast<QuicServerSessionBase*>(session()); |
| 487 return session_base->GenerateConnectionIdForReject(connection_id); | 485 return session_base->GenerateConnectionIdForReject(connection_id); |
| 488 } | 486 } |
| 489 | 487 |
| 490 } // namespace net | 488 } // namespace net |
| OLD | NEW |