OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ |
6 #define NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ | 6 #define NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "net/quic/crypto/crypto_framer.h" | 11 #include "net/quic/crypto/crypto_framer.h" |
12 #include "net/quic/quic_framer.h" | 12 #include "net/quic/quic_framer.h" |
13 #include "net/quic/quic_protocol.h" | 13 #include "net/quic/quic_protocol.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 class ProofSource; | 17 class ProofSource; |
| 18 class ProofVerifier; |
18 class QuicClock; | 19 class QuicClock; |
19 class QuicConfig; | 20 class QuicConfig; |
20 class QuicCryptoClientStream; | 21 class QuicCryptoClientStream; |
21 class QuicCryptoServerConfig; | 22 class QuicCryptoServerConfig; |
22 class QuicCryptoServerStream; | 23 class QuicCryptoServerStream; |
23 class QuicCryptoStream; | 24 class QuicCryptoStream; |
24 class QuicRandom; | 25 class QuicRandom; |
25 | 26 |
26 namespace test { | 27 namespace test { |
27 | 28 |
(...skipping 24 matching lines...) Expand all Loading... |
52 PacketSavingConnection* b_conn, | 53 PacketSavingConnection* b_conn, |
53 QuicCryptoStream* b); | 54 QuicCryptoStream* b); |
54 | 55 |
55 // Returns the value for the tag |tag| in the tag value map of |message|. | 56 // Returns the value for the tag |tag| in the tag value map of |message|. |
56 static std::string GetValueForTag(const CryptoHandshakeMessage& message, | 57 static std::string GetValueForTag(const CryptoHandshakeMessage& message, |
57 CryptoTag tag); | 58 CryptoTag tag); |
58 | 59 |
59 // Returns a |ProofSource| that serves up test certificates. | 60 // Returns a |ProofSource| that serves up test certificates. |
60 static ProofSource* ProofSourceForTesting(); | 61 static ProofSource* ProofSourceForTesting(); |
61 | 62 |
| 63 // Returns a |ProofVerifier| that uses the QUIC testing root CA. |
| 64 static ProofVerifier* ProofVerifierForTesting(); |
| 65 |
62 private: | 66 private: |
63 static void CompareClientAndServerKeys(QuicCryptoClientStream* client, | 67 static void CompareClientAndServerKeys(QuicCryptoClientStream* client, |
64 QuicCryptoServerStream* server); | 68 QuicCryptoServerStream* server); |
65 }; | 69 }; |
66 | 70 |
67 } // namespace test | 71 } // namespace test |
68 | 72 |
69 } // namespace net | 73 } // namespace net |
70 | 74 |
71 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ | 75 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ |
OLD | NEW |