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

Unified Diff: net/cert/merkle_tree_leaf.h

Issue 1943313003: Adds a function for encoding a Merkle tree leaf in TLS wire format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds tests Created 4 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
Index: net/cert/merkle_tree_leaf.h
diff --git a/net/cert/merkle_tree_leaf.h b/net/cert/merkle_tree_leaf.h
index efbe185713c6879afbe89c79ebfeb377e48f70fc..2a69bc4a3a77abac4121a6f0ff39056d09ff6825 100644
--- a/net/cert/merkle_tree_leaf.h
+++ b/net/cert/merkle_tree_leaf.h
@@ -22,9 +22,17 @@ namespace ct {
// Has all the data as the MerkleTreeLeaf defined in the RFC, arranged
// slightly differently.
struct NET_EXPORT MerkleTreeLeaf {
+ // Version enum in RFC 6962, Section 3.2.
Eran Messeri 2016/05/04 10:29:23 Nit: I'd inline those in ct_serialization.cc and a
Rob Percival 2016/05/05 15:45:31 Done.
+ enum Version { VERSION_1 = 0, };
+ // MerkleLeafType enum in RFC 6962, Section 3.4.
+ enum Type { TYPE_TIMESTAMPED_ENTRY = 0, };
+
MerkleTreeLeaf();
~MerkleTreeLeaf();
+ // Version and Merkle leaf type fields are omitted, as there is only one
+ // possible value for each of them in CTv1.
+
// The log id this leaf belongs to.
std::string log_id;

Powered by Google App Engine
This is Rietveld 408576698