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

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

Issue 15937012: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small bug fixes Created 7 years, 7 months 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
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 b811d9fba69fea93039b6cf661d85d6260c19936..3946c44846edfcaa0c096e26b43e120e3e791d73 100644
--- a/net/quic/test_tools/crypto_test_utils.h
+++ b/net/quic/test_tools/crypto_test_utils.h
@@ -17,6 +17,7 @@
namespace net {
+class ChannelIDSigner;
class CommonCertSets;
class ProofSource;
class ProofVerifier;
@@ -42,6 +43,11 @@ class CryptoTestUtils {
// If dont_verify_certs is true then no ProofVerifier is set on the client.
// Thus no certificates will be requested or checked.
bool dont_verify_certs;
+
+ // If channel_id_enabled is true then the client will attempt to send a
+ // ChannelID. The key will be the same as is returned by
+ // |ChannelIDKeyForHostname|.
+ bool channel_id_enabled;
};
// returns: the number of client hellos that the client sent.
@@ -110,6 +116,14 @@ class CryptoTestUtils {
static CryptoHandshakeMessage BuildMessage(const char* message_tag,
va_list ap);
+ // ChannelIDSignerForTesting returns a ChannelIDSigner that generates keys
+ // deterministically based on the hostname given in the Sign call.
+ static ChannelIDSigner* ChannelIDSignerForTesting();
+
+ // ChannelIDKeyForHostname returns the ChannelID key that
+ // |ChannelIDSignerForTesting| will use for the given hostname.
+ static std::string ChannelIDKeyForHostname(const std::string& hostname);
+
private:
static void CompareClientAndServerKeys(QuicCryptoClientStream* client,
QuicCryptoServerStream* server);

Powered by Google App Engine
This is Rietveld 408576698