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

Unified Diff: net/quic/test_tools/crypto_test_utils.h

Issue 1437893002: Add token binding negotiation to QUIC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107261172
Patch Set: Created 5 years, 1 month 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_crypto_server_stream_test.cc ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/crypto_test_utils.h
diff --git a/net/quic/test_tools/crypto_test_utils.h b/net/quic/test_tools/crypto_test_utils.h
index 653a001a17579debd38900f04ce3df62e96e3b68..9fa36dcdcc4e819dc6e29563642c83ee1939e9df 100644
--- a/net/quic/test_tools/crypto_test_utils.h
+++ b/net/quic/test_tools/crypto_test_utils.h
@@ -54,6 +54,16 @@ class CryptoTestUtils {
virtual void RunPendingCallbacks() = 0;
};
+ // FakeServerOptions bundles together a number of options for configuring the
+ // server in HandshakeWithFakeServer.
+ struct FakeServerOptions {
+ FakeServerOptions();
+
+ // If token_binding_enabled is true, then the server will attempt to
+ // negotiate Token Binding.
+ bool token_binding_enabled;
+ };
+
// FakeClientOptions bundles together a number of options for configuring
// HandshakeWithFakeClient.
struct FakeClientOptions {
@@ -66,12 +76,17 @@ class CryptoTestUtils {
// If channel_id_source_async is true then the client will use an async
// ChannelIDSource for testing. Ignored if channel_id_enabled is false.
bool channel_id_source_async;
+
+ // If token_binding_enabled is true, then the client will attempt to
+ // negotiate Token Binding.
+ bool token_binding_enabled;
};
// returns: the number of client hellos that the client sent.
static int HandshakeWithFakeServer(MockConnectionHelper* helper,
PacketSavingConnection* client_conn,
- QuicCryptoClientStream* client);
+ QuicCryptoClientStream* client,
+ const FakeServerOptions& options);
// returns: the number of client hellos that the client sent.
static int HandshakeWithFakeClient(MockConnectionHelper* helper,
@@ -86,7 +101,8 @@ class CryptoTestUtils {
const QuicClock* clock,
QuicRandom* rand,
QuicConfig* config,
- QuicCryptoServerConfig* crypto_config);
+ QuicCryptoServerConfig* crypto_config,
+ const FakeServerOptions& options);
// CommunicateHandshakeMessages moves messages from |a| to |b| and back until
// |a|'s handshake has completed.
« no previous file with comments | « net/quic/quic_crypto_server_stream_test.cc ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698