Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Commit 72d5367

Browse files
committed
Merge pull request #1014 from Martin2112/serialize_v2a
Proto and serialization changes for V2 structures, should align with draft v10 rfc
2 parents a6bc717 + b182400 commit 72d5367

File tree

7 files changed

+1463
-103
lines changed

7 files changed

+1463
-103
lines changed

cpp/log/etcd_consistent_store-inl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ bool LeafEntriesMatch(const Logged& a, const Logged& b) {
275275
case ct::PRECERT_ENTRY:
276276
return a.entry().precert_entry().pre_certificate() ==
277277
b.entry().precert_entry().pre_certificate();
278+
case ct::PRECERT_ENTRY_V2:
279+
// TODO(mhs): V2 implementation required here
280+
LOG(FATAL) << "CT V2 not yet implemented";
281+
break;
278282
case ct::X_JSON_ENTRY:
279283
return a.entry().x_json_entry().json() ==
280284
b.entry().x_json_entry().json();

cpp/log/logged_entry.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
using ct::LogEntry;
44
using ct::PreCert;
5+
using ct::CertInfo;
56
using ct::SignedCertificateTimestamp;
67

78
namespace cert_trans {
@@ -50,6 +51,12 @@ bool LoggedEntry::CopyFromClientLogEntry(const AsyncLogClient::Entry& entry) {
5051
break;
5152
}
5253

54+
case ct::PRECERT_ENTRY_V2: {
55+
// TODO(mhs): V2 implementation here + other changes above
56+
LOG(FATAL) << "CT V2 not yet implemented";
57+
break;
58+
}
59+
5360
default:
5461
LOG(FATAL) << "unknown entry type";
5562
}

cpp/log/logged_entry.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ class LoggedEntry : public ct::LoggedEntryPB {
6060
case ct::PRECERT_ENTRY:
6161
return Serializer::SerializePrecertChainEntry(entry().precert_entry(),
6262
dst) == Serializer::OK;
63+
case ct::PRECERT_ENTRY_V2:
64+
// TODO(mhs): V2 implementation needs to be provided.
65+
LOG(FATAL) << "CT V2 not yet implemented";
66+
break;
6367
case ct::X_JSON_ENTRY:
6468
dst->clear();
6569
return true;

0 commit comments

Comments
 (0)