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

Side by Side Diff: net/quic/test_tools/crypto_test_utils.h

Issue 2011983004: Add a new CryptoTestUtils::LeafCertHashForTesting for generating expected leaf cert hashes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122750844
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698