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

Unified Diff: net/cert/signed_tree_head.h

Issue 1845113003: Certificate Transparency: Start tracking logs' state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/signed_certificate_timestamp.cc ('k') | net/cert/signed_tree_head.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/signed_tree_head.h
diff --git a/net/cert/signed_tree_head.h b/net/cert/signed_tree_head.h
index 154c7a9d08dad187e5b83e9ed238f579ace36845..f91f2934c6eeb3033a8267365dc2e91fcb41a092 100644
--- a/net/cert/signed_tree_head.h
+++ b/net/cert/signed_tree_head.h
@@ -50,10 +50,18 @@ struct NET_EXPORT SignedTreeHead {
std::string log_id;
};
+// Two STHs are considered equal if they are from the same log and have matching
+// timestamps, since RFC6962 forbids a log from issuing two different STHs with
+// the same timestamp.
+NET_EXPORT bool operator==(const SignedTreeHead& sth1,
+ const SignedTreeHead& sth2);
+NET_EXPORT bool operator!=(const SignedTreeHead& sth1,
+ const SignedTreeHead& sth2);
+
NET_EXPORT void PrintTo(const SignedTreeHead& sth, std::ostream* os);
} // namespace ct
} // namespace net
-#endif
+#endif // NET_CERT_SIGNED_TREE_HEAD_H_
« no previous file with comments | « net/cert/signed_certificate_timestamp.cc ('k') | net/cert/signed_tree_head.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698