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

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

Issue 14411004: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use CONFIG_VERSION insteaf of VERSION Created 7 years, 8 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 73ff4802d19350d776d313437f3a8b7c4663fdd9..28202ad7b697fece165f4156fb32cdb4ee5ec8d6 100644
--- a/net/quic/test_tools/crypto_test_utils.h
+++ b/net/quic/test_tools/crypto_test_utils.h
@@ -14,11 +14,13 @@
namespace net {
+class ProofSource;
class QuicClock;
class QuicConfig;
class QuicCryptoClientStream;
class QuicCryptoServerConfig;
class QuicCryptoServerStream;
+class QuicCryptoStream;
class QuicRandom;
namespace test {
@@ -27,11 +29,13 @@ class PacketSavingConnection;
class CryptoTestUtils {
public:
- static void HandshakeWithFakeServer(PacketSavingConnection* client_conn,
- QuicCryptoClientStream* client);
+ // returns: the number of client hellos that the client sent.
+ static int HandshakeWithFakeServer(PacketSavingConnection* client_conn,
+ QuicCryptoClientStream* client);
- static void HandshakeWithFakeClient(PacketSavingConnection* server_conn,
- QuicCryptoServerStream* server);
+ // returns: the number of client hellos that the client sent.
+ static int HandshakeWithFakeClient(PacketSavingConnection* server_conn,
+ QuicCryptoServerStream* server);
// SetupCryptoServerConfigForTest configures |config| and |crypto_config|
// with sensible defaults for testing.
@@ -41,10 +45,20 @@ class CryptoTestUtils {
QuicConfig* config,
QuicCryptoServerConfig* crypto_config);
+ // CommunicateHandshakeMessages moves messages from |a| to |b| and back until
+ // |a|'s handshake has completed.
+ static void CommunicateHandshakeMessages(PacketSavingConnection* a_conn,
+ QuicCryptoStream* a,
+ PacketSavingConnection* b_conn,
+ QuicCryptoStream* b);
+
// Returns the value for the tag |tag| in the tag value map of |message|.
static std::string GetValueForTag(const CryptoHandshakeMessage& message,
CryptoTag tag);
+ // Returns a |ProofSource| that serves up test certificates.
+ static ProofSource* ProofSourceForTesting();
+
private:
static void CompareClientAndServerKeys(QuicCryptoClientStream* client,
QuicCryptoServerStream* server);

Powered by Google App Engine
This is Rietveld 408576698