| 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 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 namespace ct { | 14 namespace ct { |
| 15 | 15 |
| 16 struct LogEntry; | 16 struct LogEntry; |
| 17 struct SignedCertificateTimestamp; | 17 struct SignedCertificateTimestamp; |
| 18 struct SignedTreeHead; |
| 18 | 19 |
| 19 // Note: unless specified otherwise, all test data is taken from Certificate | 20 // Note: unless specified otherwise, all test data is taken from Certificate |
| 20 // Transparency test data repository. | 21 // Transparency test data repository. |
| 21 | 22 |
| 22 // Fills |entry| with test data for an X.509 entry. | 23 // Fills |entry| with test data for an X.509 entry. |
| 23 void GetX509CertLogEntry(LogEntry* entry); | 24 void GetX509CertLogEntry(LogEntry* entry); |
| 24 | 25 |
| 25 // Returns a DER-encoded X509 cert. The SCT provided by | 26 // Returns a DER-encoded X509 cert. The SCT provided by |
| 26 // GetX509CertSCT is signed over this certificate. | 27 // GetX509CertSCT is signed over this certificate. |
| 27 std::string GetDerEncodedX509Cert(); | 28 std::string GetDerEncodedX509Cert(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 55 | 56 |
| 56 // The SCT list embedded in the response above. | 57 // The SCT list embedded in the response above. |
| 57 std::string GetFakeOCSPExtensionValue(); | 58 std::string GetFakeOCSPExtensionValue(); |
| 58 | 59 |
| 59 // The cert the OCSP response is for. | 60 // The cert the OCSP response is for. |
| 60 std::string GetDerEncodedFakeOCSPResponseCert(); | 61 std::string GetDerEncodedFakeOCSPResponseCert(); |
| 61 | 62 |
| 62 // The issuer of the previous cert. | 63 // The issuer of the previous cert. |
| 63 std::string GetDerEncodedFakeOCSPResponseIssuerCert(); | 64 std::string GetDerEncodedFakeOCSPResponseIssuerCert(); |
| 64 | 65 |
| 66 // A sample, valid STH |
| 67 void GetSignedTreeHead(SignedTreeHead* sth); |
| 68 |
| 69 // The Sha256 root hash for the sample STH |
| 70 std::string GetSampleSTHSha256RootHash(); |
| 71 |
| 65 } // namespace ct | 72 } // namespace ct |
| 66 | 73 |
| 67 } // namespace net | 74 } // namespace net |
| 68 | 75 |
| 69 #endif // NET_CERT_CT_TEST_UTIL_H_ | 76 #endif // NET_CERT_CT_TEST_UTIL_H_ |
| OLD | NEW |