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

Unified Diff: net/cert/ct_serialization.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: Updates TODO about Version enums Created 4 years, 7 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 | « no previous file | net/cert/ct_serialization.cc » ('j') | net/cert/signed_certificate_timestamp.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ct_serialization.h
diff --git a/net/cert/ct_serialization.h b/net/cert/ct_serialization.h
index f183247469f9e217e017894b425c8af095127817..83fea050554c64518a7697bbb25433d00d04f485 100644
--- a/net/cert/ct_serialization.h
+++ b/net/cert/ct_serialization.h
@@ -10,6 +10,7 @@
#include "base/strings/string_piece.h"
#include "net/base/net_export.h"
+#include "net/cert/merkle_tree_leaf.h"
Eran Messeri 2016/05/05 15:59:33 Nit: Can you get away with forward-declaring Merkl
Rob Percival 2016/05/05 17:31:43 I can; I only didn't because nothing else was. I'v
#include "net/cert/signed_certificate_timestamp.h"
#include "net/cert/signed_tree_head.h"
@@ -35,6 +36,11 @@ NET_EXPORT_PRIVATE bool DecodeDigitallySigned(base::StringPiece* input,
NET_EXPORT_PRIVATE bool EncodeLogEntry(const LogEntry& input,
std::string* output);
+// Encodes the Merkle tree |leaf| into |output|.
+// These bytes can be hashed for use with inclusion proof fetching.
+// Note that the log ID is not serialized.
+NET_EXPORT bool EncodeTreeLeaf(const MerkleTreeLeaf& leaf, std::string* output);
+
// Encodes the data signed by a Signed Certificate Timestamp (SCT) into
// |output|. The signature included in the SCT is then verified over these
// bytes.
« no previous file with comments | « no previous file | net/cert/ct_serialization.cc » ('j') | net/cert/signed_certificate_timestamp.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698