| Index: net/quic/quic_crypto_server_stream.cc
|
| diff --git a/net/quic/quic_crypto_server_stream.cc b/net/quic/quic_crypto_server_stream.cc
|
| index 73ae154970912aed364d62d84c35942772306626..dac20875a1abc4c9cf1078c42adadd0f82867b27 100644
|
| --- a/net/quic/quic_crypto_server_stream.cc
|
| +++ b/net/quic/quic_crypto_server_stream.cc
|
| @@ -11,6 +11,7 @@
|
| #include "net/quic/crypto/quic_crypto_server_config.h"
|
| #include "net/quic/crypto/source_address_token.h"
|
| #include "net/quic/quic_config.h"
|
| +#include "net/quic/quic_flags.h"
|
| #include "net/quic/quic_protocol.h"
|
| #include "net/quic/quic_session.h"
|
|
|
| @@ -119,8 +120,7 @@ void QuicCryptoServerStream::FinishProcessingHandshakeMessage(
|
| session()->connection()->SetEncrypter(
|
| ENCRYPTION_INITIAL,
|
| crypto_negotiated_params_.initial_crypters.encrypter.release());
|
| - session()->connection()->SetDefaultEncryptionLevel(
|
| - ENCRYPTION_INITIAL);
|
| + session()->connection()->SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
|
| // Set the decrypter immediately so that we no longer accept unencrypted
|
| // packets.
|
| session()->connection()->SetDecrypter(
|
| @@ -140,8 +140,10 @@ void QuicCryptoServerStream::FinishProcessingHandshakeMessage(
|
| session()->connection()->SetEncrypter(
|
| ENCRYPTION_FORWARD_SECURE,
|
| crypto_negotiated_params_.forward_secure_crypters.encrypter.release());
|
| - session()->connection()->SetDefaultEncryptionLevel(
|
| - ENCRYPTION_FORWARD_SECURE);
|
| + if (!FLAGS_enable_quic_delay_forward_security) {
|
| + session()->connection()->SetDefaultEncryptionLevel(
|
| + ENCRYPTION_FORWARD_SECURE);
|
| + }
|
| session()->connection()->SetAlternativeDecrypter(
|
| crypto_negotiated_params_.forward_secure_crypters.decrypter.release(),
|
| ENCRYPTION_FORWARD_SECURE, false /* don't latch */);
|
|
|