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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 // We want to be notified when the SHLO is ACKed so that we can disable | 205 // We want to be notified when the SHLO is ACKed so that we can disable |
206 // HANDSHAKE_MODE in the sent packet manager. | 206 // HANDSHAKE_MODE in the sent packet manager. |
207 scoped_refptr<ServerHelloNotifier> server_hello_notifier( | 207 scoped_refptr<ServerHelloNotifier> server_hello_notifier( |
208 new ServerHelloNotifier(this)); | 208 new ServerHelloNotifier(this)); |
209 SendHandshakeMessage(reply, server_hello_notifier.get()); | 209 SendHandshakeMessage(reply, server_hello_notifier.get()); |
210 | 210 |
211 session()->connection()->SetEncrypter( | 211 session()->connection()->SetEncrypter( |
212 ENCRYPTION_FORWARD_SECURE, | 212 ENCRYPTION_FORWARD_SECURE, |
213 crypto_negotiated_params_.forward_secure_crypters.encrypter.release()); | 213 crypto_negotiated_params_.forward_secure_crypters.encrypter.release()); |
| 214 if (config->HasClientSentConnectionOption(kIPFS, Perspective::IS_SERVER)) { |
| 215 session()->connection()->SetDefaultEncryptionLevel( |
| 216 ENCRYPTION_FORWARD_SECURE); |
| 217 } |
| 218 |
214 session()->connection()->SetAlternativeDecrypter( | 219 session()->connection()->SetAlternativeDecrypter( |
215 ENCRYPTION_FORWARD_SECURE, | 220 ENCRYPTION_FORWARD_SECURE, |
216 crypto_negotiated_params_.forward_secure_crypters.decrypter.release(), | 221 crypto_negotiated_params_.forward_secure_crypters.decrypter.release(), |
217 false /* don't latch */); | 222 false /* don't latch */); |
218 | 223 |
219 encryption_established_ = true; | 224 encryption_established_ = true; |
220 handshake_confirmed_ = true; | 225 handshake_confirmed_ = true; |
221 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); | 226 session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED); |
222 } | 227 } |
223 | 228 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } | 393 } |
389 for (size_t i = 0; i < received_tags_length; ++i) { | 394 for (size_t i = 0; i < received_tags_length; ++i) { |
390 if (received_tags[i] == kSREJ) { | 395 if (received_tags[i] == kSREJ) { |
391 return true; | 396 return true; |
392 } | 397 } |
393 } | 398 } |
394 return false; | 399 return false; |
395 } | 400 } |
396 | 401 |
397 } // namespace net | 402 } // namespace net |
OLD | NEW |