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

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

Issue 55953002: CT: Adding SCT verification functionality: A CTLogVerifier instance can verify SCTs signed by a sin… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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
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 9
10 namespace net { 10 namespace net {
11 11
12 class X509Certificate; 12 class X509Certificate;
13 13
14 namespace ct { 14 namespace ct {
15 15
16 struct LogEntry; 16 struct LogEntry;
17 struct SignedCertificateTimestamp; 17 struct SignedCertificateTimestamp;
18 18
19 // Note: unless specified otherwise, all test data is taken from Certificate
20 // Transparency test data repository.
21
19 // Fills |entry| with test data for an X.509 entry. 22 // Fills |entry| with test data for an X.509 entry.
20 void GetX509CertLogEntry(LogEntry* entry); 23 void GetX509CertLogEntry(LogEntry* entry);
21 24
22 // Fills |entry| with test data for a Precertificate entry. 25 // Fills |entry| with test data for a Precertificate entry.
23 void GetPrecertLogEntry(LogEntry* entry); 26 void GetPrecertLogEntry(LogEntry* entry);
24 27
25 // Returns the binary representation of a test DigitallySigned 28 // Returns the binary representation of a test DigitallySigned
26 std::string GetTestDigitallySigned(); 29 std::string GetTestDigitallySigned();
27 30
28 // Returns the binary representation of a test serialized SCT. 31 // Returns the binary representation of a test serialized SCT.
29 std::string GetTestSignedCertificateTimestamp(); 32 std::string GetTestSignedCertificateTimestamp();
30 33
34 // Test log key
35 std::string GetTestPublicKey();
36
37 // ID of test log key
38 std::string GetTestPublicKeyId();
39
40 // SCT for the X509Certificate provided above.
41 void GetX509CertSCT(SignedCertificateTimestamp* sct);
42
43 // SCT for the Precertificate log entry provided above.
44 void GetPrecertSCT(SignedCertificateTimestamp* sct);
45
31 } // namespace ct 46 } // namespace ct
32 47
33 } // namespace net 48 } // namespace net
34 49
35 #endif // NET_CERT_CT_TEST_UTIL_H_ 50 #endif // NET_CERT_CT_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698