OLD | NEW |
---|---|
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 "base/memory/ref_counted.h" | |
9 | 10 |
10 namespace net { | 11 namespace net { |
11 | 12 |
12 class X509Certificate; | 13 class SignedCertificateTimestamp; |
wtc
2013/11/19 01:57:40
Is this correct? SignedCertificateTimestamp is def
alcutter
2013/11/19 15:51:34
Good catch - that certainly wasn't correct.
| |
13 | 14 |
14 namespace ct { | 15 namespace ct { |
15 | 16 |
16 struct LogEntry; | 17 struct LogEntry; |
17 struct SignedCertificateTimestamp; | |
18 | 18 |
19 // Note: unless specified otherwise, all test data is taken from Certificate | 19 // Note: unless specified otherwise, all test data is taken from Certificate |
20 // Transparency test data repository. | 20 // Transparency test data repository. |
21 | 21 |
22 // Fills |entry| with test data for an X.509 entry. | 22 // Fills |entry| with test data for an X.509 entry. |
23 void GetX509CertLogEntry(LogEntry* entry); | 23 void GetX509CertLogEntry(LogEntry* entry); |
24 | 24 |
25 // Fills |entry| with test data for a Precertificate entry. | 25 // Fills |entry| with test data for a Precertificate entry. |
26 void GetPrecertLogEntry(LogEntry* entry); | 26 void GetPrecertLogEntry(LogEntry* entry); |
27 | 27 |
28 // Returns the binary representation of a test DigitallySigned | 28 // Returns the binary representation of a test DigitallySigned |
29 std::string GetTestDigitallySigned(); | 29 std::string GetTestDigitallySigned(); |
30 | 30 |
31 // Returns the binary representation of a test serialized SCT. | 31 // Returns the binary representation of a test serialized SCT. |
32 std::string GetTestSignedCertificateTimestamp(); | 32 std::string GetTestSignedCertificateTimestamp(); |
33 | 33 |
34 // Test log key | 34 // Test log key |
35 std::string GetTestPublicKey(); | 35 std::string GetTestPublicKey(); |
36 | 36 |
37 // ID of test log key | 37 // ID of test log key |
38 std::string GetTestPublicKeyId(); | 38 std::string GetTestPublicKeyId(); |
39 | 39 |
40 // SCT for the X509Certificate provided above. | 40 // SCT for the X509Certificate provided above. |
41 void GetX509CertSCT(SignedCertificateTimestamp* sct); | 41 void GetX509CertSCT(scoped_refptr<SignedCertificateTimestamp>* sct); |
42 | 42 |
43 // SCT for the Precertificate log entry provided above. | 43 // SCT for the Precertificate log entry provided above. |
44 void GetPrecertSCT(SignedCertificateTimestamp* sct); | 44 void GetPrecertSCT(scoped_refptr<SignedCertificateTimestamp>* sct); |
45 | 45 |
46 } // namespace ct | 46 } // namespace ct |
47 | 47 |
48 } // namespace net | 48 } // namespace net |
49 | 49 |
50 #endif // NET_CERT_CT_TEST_UTIL_H_ | 50 #endif // NET_CERT_CT_TEST_UTIL_H_ |
OLD | NEW |