| 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 <stdarg.h> | 8 #include <stdarg.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 // Returns a |ProofSource| that serves up test certificates. | 146 // Returns a |ProofSource| that serves up test certificates. |
| 147 static ProofSource* ProofSourceForTesting(); | 147 static ProofSource* ProofSourceForTesting(); |
| 148 | 148 |
| 149 // Returns a |ProofVerifier| that uses the QUIC testing root CA. | 149 // Returns a |ProofVerifier| that uses the QUIC testing root CA. |
| 150 static ProofVerifier* ProofVerifierForTesting(); | 150 static ProofVerifier* ProofVerifierForTesting(); |
| 151 | 151 |
| 152 // Returns a real ProofVerifier (not a fake proof verifier) for testing. | 152 // Returns a real ProofVerifier (not a fake proof verifier) for testing. |
| 153 static ProofVerifier* RealProofVerifierForTesting(); | 153 static ProofVerifier* RealProofVerifierForTesting(); |
| 154 | 154 |
| 155 // Returns a hash of the leaf test certificate. |
| 156 static uint64_t LeafCertHashForTesting(); |
| 157 |
| 155 // Returns a |ProofVerifyContext| that must be used with the verifier | 158 // Returns a |ProofVerifyContext| that must be used with the verifier |
| 156 // returned by |ProofVerifierForTesting|. | 159 // returned by |ProofVerifierForTesting|. |
| 157 static ProofVerifyContext* ProofVerifyContextForTesting(); | 160 static ProofVerifyContext* ProofVerifyContextForTesting(); |
| 158 | 161 |
| 159 // MockCommonCertSets returns a CommonCertSets that contains a single set with | 162 // MockCommonCertSets returns a CommonCertSets that contains a single set with |
| 160 // hash |hash|, consisting of the certificate |cert| at index |index|. | 163 // hash |hash|, consisting of the certificate |cert| at index |index|. |
| 161 static CommonCertSets* MockCommonCertSets(base::StringPiece cert, | 164 static CommonCertSets* MockCommonCertSets(base::StringPiece cert, |
| 162 uint64_t hash, | 165 uint64_t hash, |
| 163 uint32_t index); | 166 uint32_t index); |
| 164 | 167 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 QuicCryptoServerStream* server); | 211 QuicCryptoServerStream* server); |
| 209 | 212 |
| 210 DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils); | 213 DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils); |
| 211 }; | 214 }; |
| 212 | 215 |
| 213 } // namespace test | 216 } // namespace test |
| 214 | 217 |
| 215 } // namespace net | 218 } // namespace net |
| 216 | 219 |
| 217 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ | 220 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ |
| OLD | NEW |