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

Side by Side Diff: net/test/ct_test_util.h

Issue 1244073002: QUIC - disable QuicPacketGeneratorTest.DontCrashOnInvalidStopWaiting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 5 years 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/proof_verifier_chromium_test.cc ('k') | net/test/ct_test_util.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CERT_CT_TEST_UTIL_H_ 5 #ifndef NET_CERT_CT_TEST_UTIL_H_
6 #define NET_CERT_CT_TEST_UTIL_H_ 6 #define NET_CERT_CT_TEST_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "net/cert/signed_certificate_timestamp.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 namespace ct { 16 namespace ct {
16 17
18 struct CTVerifyResult;
17 struct DigitallySigned; 19 struct DigitallySigned;
18 struct LogEntry; 20 struct LogEntry;
19 struct SignedCertificateTimestamp;
20 struct SignedTreeHead; 21 struct SignedTreeHead;
21 22
22 // Note: unless specified otherwise, all test data is taken from Certificate 23 // Note: unless specified otherwise, all test data is taken from Certificate
23 // Transparency test data repository. 24 // Transparency test data repository.
24 25
25 // Fills |entry| with test data for an X.509 entry. 26 // Fills |entry| with test data for an X.509 entry.
26 void GetX509CertLogEntry(LogEntry* entry); 27 void GetX509CertLogEntry(LogEntry* entry);
27 28
28 // Returns a DER-encoded X509 cert. The SCT provided by 29 // Returns a DER-encoded X509 cert. The SCT provided by
29 // GetX509CertSCT is signed over this certificate. 30 // GetX509CertSCT is signed over this certificate.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // the provided parameters. 85 // the provided parameters.
85 std::string CreateSignedTreeHeadJsonString(size_t tree_size, 86 std::string CreateSignedTreeHeadJsonString(size_t tree_size,
86 int64_t timestamp, 87 int64_t timestamp,
87 std::string sha256_root_hash, 88 std::string sha256_root_hash,
88 std::string tree_head_signature); 89 std::string tree_head_signature);
89 90
90 // Assembles, and returns, a sample consistency proof in JSON format using 91 // Assembles, and returns, a sample consistency proof in JSON format using
91 // the provided raw nodes (i.e. the raw nodes will be base64-encoded). 92 // the provided raw nodes (i.e. the raw nodes will be base64-encoded).
92 std::string CreateConsistencyProofJsonString( 93 std::string CreateConsistencyProofJsonString(
93 const std::vector<std::string>& raw_nodes); 94 const std::vector<std::string>& raw_nodes);
95
96 // Returns SCTList for testing.
97 std::string GetSCTListForTesting();
98
99 // Returns a corrupted SCTList. This is done by changing a byte inside the
100 // Log ID part of the SCT so it does not match the log used in the tests.
101 std::string GetSCTListWithInvalidSCT();
102
103 // Returns true if |log_description| is in the |result|'s |verified_scts| and
104 // number of |verified_scts| in |result| is equal to 1.
105 bool CheckForSingleVerifiedSCTInResult(const CTVerifyResult& result,
106 const std::string& log_description);
107
108 // Returns true if |origin| is in the |result|'s |verified_scts|.
109 bool CheckForSCTOrigin(const CTVerifyResult& result,
110 SignedCertificateTimestamp::Origin origin);
111
94 } // namespace ct 112 } // namespace ct
95 113
96 } // namespace net 114 } // namespace net
97 115
98 #endif // NET_CERT_CT_TEST_UTIL_H_ 116 #endif // NET_CERT_CT_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/proof_verifier_chromium_test.cc ('k') | net/test/ct_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698