| 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 30 matching lines...) Expand all Loading... |
| 41 void ServerHelloNotifier::OnPacketAcked(int acked_bytes, | 41 void ServerHelloNotifier::OnPacketAcked(int acked_bytes, |
| 42 QuicTime::Delta ack_delay_time) { | 42 QuicTime::Delta ack_delay_time) { |
| 43 // The SHLO is sent in one packet. | 43 // The SHLO is sent in one packet. |
| 44 server_stream_->OnServerHelloAcked(); | 44 server_stream_->OnServerHelloAcked(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void ServerHelloNotifier::OnPacketRetransmitted(int /*retransmitted_bytes*/) {} | 47 void ServerHelloNotifier::OnPacketRetransmitted(int /*retransmitted_bytes*/) {} |
| 48 | 48 |
| 49 QuicCryptoServerStream::QuicCryptoServerStream( | 49 QuicCryptoServerStream::QuicCryptoServerStream( |
| 50 const QuicCryptoServerConfig* crypto_config, | 50 const QuicCryptoServerConfig* crypto_config, |
| 51 bool use_stateless_rejects_if_peer_supported, |
| 51 QuicSession* session) | 52 QuicSession* session) |
| 52 : QuicCryptoServerStreamBase(session), | 53 : QuicCryptoServerStreamBase(session), |
| 53 crypto_config_(crypto_config), | 54 crypto_config_(crypto_config), |
| 54 validate_client_hello_cb_(nullptr), | 55 validate_client_hello_cb_(nullptr), |
| 55 num_handshake_messages_(0), | 56 num_handshake_messages_(0), |
| 56 num_handshake_messages_with_server_nonces_(0), | 57 num_handshake_messages_with_server_nonces_(0), |
| 57 num_server_config_update_messages_sent_(0), | 58 num_server_config_update_messages_sent_(0), |
| 58 use_stateless_rejects_if_peer_supported_( | 59 use_stateless_rejects_if_peer_supported_( |
| 59 FLAGS_enable_quic_stateless_reject_support), | 60 use_stateless_rejects_if_peer_supported), |
| 60 peer_supports_stateless_rejects_(false) { | 61 peer_supports_stateless_rejects_(false) { |
| 61 DCHECK_EQ(Perspective::IS_SERVER, session->connection()->perspective()); | 62 DCHECK_EQ(Perspective::IS_SERVER, session->connection()->perspective()); |
| 62 } | 63 } |
| 63 | 64 |
| 64 QuicCryptoServerStream::~QuicCryptoServerStream() { | 65 QuicCryptoServerStream::~QuicCryptoServerStream() { |
| 65 CancelOutstandingCallbacks(); | 66 CancelOutstandingCallbacks(); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void QuicCryptoServerStream::CancelOutstandingCallbacks() { | 69 void QuicCryptoServerStream::CancelOutstandingCallbacks() { |
| 69 // Detach from the validation callback. Calling this multiple times is safe. | 70 // Detach from the validation callback. Calling this multiple times is safe. |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 377 } |
| 377 for (size_t i = 0; i < received_tags_length; ++i) { | 378 for (size_t i = 0; i < received_tags_length; ++i) { |
| 378 if (received_tags[i] == kSREJ) { | 379 if (received_tags[i] == kSREJ) { |
| 379 return true; | 380 return true; |
| 380 } | 381 } |
| 381 } | 382 } |
| 382 return false; | 383 return false; |
| 383 } | 384 } |
| 384 | 385 |
| 385 } // namespace net | 386 } // namespace net |
| OLD | NEW |