diff options
Diffstat (limited to 'chromium/net/quic/test_tools/crypto_test_utils.h')
-rw-r--r-- | chromium/net/quic/test_tools/crypto_test_utils.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/chromium/net/quic/test_tools/crypto_test_utils.h b/chromium/net/quic/test_tools/crypto_test_utils.h index 60674a9e63d..a226c85ad9c 100644 --- a/chromium/net/quic/test_tools/crypto_test_utils.h +++ b/chromium/net/quic/test_tools/crypto_test_utils.h @@ -10,6 +10,7 @@ #include <utility> #include <vector> +#include "base/basictypes.h" #include "base/logging.h" #include "base/strings/string_piece.h" #include "net/quic/crypto/crypto_framer.h" @@ -18,10 +19,11 @@ namespace net { -class ChannelIDSigner; +class ChannelIDSource; class CommonCertSets; class ProofSource; class ProofVerifier; +class ProofVerifyContext; class QuicClock; class QuicConfig; class QuicCryptoClientStream; @@ -46,8 +48,7 @@ class CryptoTestUtils { 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 - // ChannelIDSigner's |GetKeyForHostname|. + // ChannelID. bool channel_id_enabled; }; @@ -95,6 +96,10 @@ class CryptoTestUtils { // Returns a |ProofVerifier| that uses the QUIC testing root CA. static ProofVerifier* ProofVerifierForTesting(); + // Returns a |ProofVerifyContext| that must be used with the verifier + // returned by |ProofVerifierForTesting|. + static ProofVerifyContext* ProofVerifyContextForTesting(); + // MockCommonCertSets returns a CommonCertSets that contains a single set with // hash |hash|, consisting of the certificate |cert| at index |index|. static CommonCertSets* MockCommonCertSets(base::StringPiece cert, @@ -127,13 +132,17 @@ 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(); + // ChannelIDSourceForTesting returns a ChannelIDSource that generates keys + // deterministically based on the hostname given in the GetChannelIDKey call. + // This ChannelIDSource works in synchronous mode, i.e., its GetChannelIDKey + // method never returns QUIC_PENDING. + static ChannelIDSource* ChannelIDSourceForTesting(); private: static void CompareClientAndServerKeys(QuicCryptoClientStream* client, QuicCryptoServerStream* server); + + DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils); }; } // namespace test |