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); |