| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // HANDSHAKE_MODE in the sent packet manager. | 239 // HANDSHAKE_MODE in the sent packet manager. |
| 240 scoped_refptr<ServerHelloNotifier> server_hello_notifier( | 240 scoped_refptr<ServerHelloNotifier> server_hello_notifier( |
| 241 new ServerHelloNotifier(this)); | 241 new ServerHelloNotifier(this)); |
| 242 SendHandshakeMessage(reply, FLAGS_quic_no_shlo_listener | 242 SendHandshakeMessage(reply, FLAGS_quic_no_shlo_listener |
| 243 ? nullptr | 243 ? nullptr |
| 244 : server_hello_notifier.get()); | 244 : server_hello_notifier.get()); |
| 245 | 245 |
| 246 session()->connection()->SetEncrypter( | 246 session()->connection()->SetEncrypter( |
| 247 ENCRYPTION_FORWARD_SECURE, | 247 ENCRYPTION_FORWARD_SECURE, |
| 248 crypto_negotiated_params_.forward_secure_crypters.encrypter.release()); | 248 crypto_negotiated_params_.forward_secure_crypters.encrypter.release()); |
| 249 if (FLAGS_quic_default_immediate_forward_secure != | 249 session()->connection()->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE); |
| 250 config->HasClientSentConnectionOption(kIPFS, Perspective::IS_SERVER)) { | |
| 251 session()->connection()->SetDefaultEncryptionLevel( | |
| 252 ENCRYPTION_FORWARD_SECURE); | |
| 253 } | |
| 254 | 250 |
| 255 session()->connection()->SetAlternativeDecrypter( | 251 session()->connection()->SetAlternativeDecrypter( |
| 256 ENCRYPTION_FORWARD_SECURE, | 252 ENCRYPTION_FORWARD_SECURE, |
| 257 crypto_negotiated_params_.forward_secure_crypters.decrypter.release(), | 253 crypto_negotiated_params_.forward_secure_crypters.decrypter.release(), |
| 258 false /* don't latch */); | 254 false /* don't latch */); |
| 259 | 255 |
| 260 encryption_established_ = true; | 256 encryption_established_ = true; |
| 261 handshake_confirmed_ = true; | 257 handshake_confirmed_ = true; |
| 262 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); | 258 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); |
| 263 } | 259 } |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject( | 475 QuicConnectionId QuicCryptoServerStream::GenerateConnectionIdForReject( |
| 480 QuicConnectionId connection_id) { | 476 QuicConnectionId connection_id) { |
| 481 // TODO(rch): Remove this method when | 477 // TODO(rch): Remove this method when |
| 482 // reloadable_flag_quic_dispatcher_creates_id2 is removed. | 478 // reloadable_flag_quic_dispatcher_creates_id2 is removed. |
| 483 QuicServerSessionBase* session_base = | 479 QuicServerSessionBase* session_base = |
| 484 static_cast<QuicServerSessionBase*>(session()); | 480 static_cast<QuicServerSessionBase*>(session()); |
| 485 return session_base->GenerateConnectionIdForReject(connection_id); | 481 return session_base->GenerateConnectionIdForReject(connection_id); |
| 486 } | 482 } |
| 487 | 483 |
| 488 } // namespace net | 484 } // namespace net |
| OLD | NEW |