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

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: Addresses review comments 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/ct_serialization.cc » ('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..6219b8a95b6493863c691a49297fb2b4cd05861f 100644
--- a/net/cert/ct_serialization.h
+++ b/net/cert/ct_serialization.h
@@ -19,6 +19,8 @@ namespace net {
// Transparency to/from the TLS wire format encoding.
namespace ct {
+struct MerkleTreeLeaf;
+
// If |input.signature_data| is less than kMaxSignatureLength, encodes the
// |input| to |output| and returns true. Otherwise, returns false.
NET_EXPORT_PRIVATE bool EncodeDigitallySigned(const DigitallySigned& input,
@@ -35,6 +37,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.
eroman 2016/05/07 00:20:52 Not quite sure what this line means. Does this me
Rob Percival 2016/05/08 04:08:18 Yes - I've clarified this.
+NET_EXPORT bool EncodeTreeLeaf(const MerkleTreeLeaf& leaf, std::string* output);
eroman 2016/05/07 00:20:52 Please clarify in the comments that this *appends*
Rob Percival 2016/05/08 04:08:17 Clarified. The same ought to be done for the other
+
// 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/ct_serialization.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698