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

Unified Diff: net/cert/ct_objects_extractor_unittest.cc

Issue 2824983002: Rename net::ct::LogEntry to SignedEntryData and clarify the comment. (Closed)
Patch Set: sort forward decls Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/ct_objects_extractor.cc ('k') | net/cert/ct_serialization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ct_objects_extractor_unittest.cc
diff --git a/net/cert/ct_objects_extractor_unittest.cc b/net/cert/ct_objects_extractor_unittest.cc
index 107364511dec47f320ece47647d966840bf94cdb..5f870c156662d1a9d116bffaff7a1204749a56e8 100644
--- a/net/cert/ct_objects_extractor_unittest.cc
+++ b/net/cert/ct_objects_extractor_unittest.cc
@@ -72,12 +72,12 @@ TEST_F(CTObjectsExtractorTest, ExtractEmbeddedSCT) {
}
TEST_F(CTObjectsExtractorTest, ExtractPrecert) {
- LogEntry entry;
- ASSERT_TRUE(GetPrecertLogEntry(precert_chain_[0]->os_cert_handle(),
- precert_chain_[1]->os_cert_handle(),
- &entry));
+ SignedEntryData entry;
+ ASSERT_TRUE(GetPrecertSignedEntry(precert_chain_[0]->os_cert_handle(),
+ precert_chain_[1]->os_cert_handle(),
+ &entry));
- ASSERT_EQ(ct::LogEntry::LOG_ENTRY_TYPE_PRECERT, entry.type);
+ ASSERT_EQ(ct::SignedEntryData::LOG_ENTRY_TYPE_PRECERT, entry.type);
// Should have empty leaf cert for this log entry type.
ASSERT_TRUE(entry.leaf_certificate.empty());
// Compare hash values of issuer spki.
@@ -87,10 +87,10 @@ TEST_F(CTObjectsExtractorTest, ExtractPrecert) {
}
TEST_F(CTObjectsExtractorTest, ExtractOrdinaryX509Cert) {
- LogEntry entry;
- ASSERT_TRUE(GetX509LogEntry(test_cert_->os_cert_handle(), &entry));
+ SignedEntryData entry;
+ ASSERT_TRUE(GetX509SignedEntry(test_cert_->os_cert_handle(), &entry));
- ASSERT_EQ(ct::LogEntry::LOG_ENTRY_TYPE_X509, entry.type);
+ ASSERT_EQ(ct::SignedEntryData::LOG_ENTRY_TYPE_X509, entry.type);
// Should have empty tbs_certificate for this log entry type.
ASSERT_TRUE(entry.tbs_certificate.empty());
// Length of leaf_certificate should be 718, see the CT Serialization tests.
@@ -103,23 +103,23 @@ TEST_F(CTObjectsExtractorTest, ExtractedSCTVerifies) {
new ct::SignedCertificateTimestamp());
ExtractEmbeddedSCT(precert_chain_[0], &sct);
- LogEntry entry;
- ASSERT_TRUE(GetPrecertLogEntry(precert_chain_[0]->os_cert_handle(),
- precert_chain_[1]->os_cert_handle(),
- &entry));
+ SignedEntryData entry;
+ ASSERT_TRUE(GetPrecertSignedEntry(precert_chain_[0]->os_cert_handle(),
+ precert_chain_[1]->os_cert_handle(),
+ &entry));
EXPECT_TRUE(log_->Verify(entry, *sct.get()));
}
-// Test that an externally-provided SCT verifies over the LogEntry
+// Test that an externally-provided SCT verifies over the SignedEntryData
// of a regular X.509 Certificate
TEST_F(CTObjectsExtractorTest, ComplementarySCTVerifies) {
scoped_refptr<ct::SignedCertificateTimestamp> sct(
new ct::SignedCertificateTimestamp());
GetX509CertSCT(&sct);
- LogEntry entry;
- ASSERT_TRUE(GetX509LogEntry(test_cert_->os_cert_handle(), &entry));
+ SignedEntryData entry;
+ ASSERT_TRUE(GetX509SignedEntry(test_cert_->os_cert_handle(), &entry));
EXPECT_TRUE(log_->Verify(entry, *sct.get()));
}
« no previous file with comments | « net/cert/ct_objects_extractor.cc ('k') | net/cert/ct_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698