Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(676)

Unified Diff: net/quic/test_tools/mock_crypto_client_stream.cc

Issue 1507853003: Reland of Close the QUIC connection when non-crypto stream data is written at ENCRYPTION_NONE. Flag protected… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/mock_crypto_client_stream.cc
diff --git a/net/quic/test_tools/mock_crypto_client_stream.cc b/net/quic/test_tools/mock_crypto_client_stream.cc
index 290693933fd3202e7658e1167e4b220906d2a64e..c54ccff7a0cfce5d1a189c249748e9982c9f6f2f 100644
--- a/net/quic/test_tools/mock_crypto_client_stream.cc
+++ b/net/quic/test_tools/mock_crypto_client_stream.cc
@@ -5,6 +5,7 @@
#include "net/quic/test_tools/mock_crypto_client_stream.h"
#include "net/quic/crypto/quic_decrypter.h"
+#include "net/quic/crypto/quic_encrypter.h"
#include "net/quic/quic_client_session_base.h"
#include "net/quic/quic_server_id.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -40,6 +41,9 @@
handshake_confirmed_ = false;
session()->connection()->SetDecrypter(ENCRYPTION_INITIAL,
QuicDecrypter::Create(kNULL));
+ session()->connection()->SetEncrypter(ENCRYPTION_INITIAL,
+ QuicEncrypter::Create(kNULL));
+ session()->connection()->SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
session()->OnCryptoHandshakeEvent(
QuicSession::ENCRYPTION_FIRST_ESTABLISHED);
break;
@@ -56,6 +60,10 @@
SetConfigNegotiated();
session()->connection()->SetDecrypter(ENCRYPTION_FORWARD_SECURE,
QuicDecrypter::Create(kNULL));
+ session()->connection()->SetEncrypter(ENCRYPTION_FORWARD_SECURE,
+ QuicEncrypter::Create(kNULL));
+ session()->connection()->SetDefaultEncryptionLevel(
+ ENCRYPTION_FORWARD_SECURE);
session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED);
break;
}
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698