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

Unified Diff: net/cert/ct_log_verifier.h

Issue 67513008: Certificate Transparency: Add the high-level interface for verifying SCTs over multiple logs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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_log_verifier.cc » ('j') | net/cert/ct_serialization.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ct_log_verifier.h
diff --git a/net/cert/ct_log_verifier.h b/net/cert/ct_log_verifier.h
index b4ee52026746809a7c8b0e3657ceae77a1d0f6ad..f31d8141b3a4a2bcf83ea26eacf0eab9c1759f44 100644
--- a/net/cert/ct_log_verifier.h
+++ b/net/cert/ct_log_verifier.h
@@ -27,6 +27,14 @@ namespace net {
// specific log (whose identity is provided during construction).
class NET_EXPORT CTLogVerifier {
public:
+ enum VerifyResult {
Ryan Sleevi 2013/11/20 01:09:42 nit: Do you think the naming will be confusing wit
Eran M. (Google) 2013/11/20 19:45:06 This isn't really necessary anymore now that the M
+ SCT_VERIFIED_OK = 0,
+ SCT_NOT_FROM_THIS_LOG = 1,
+ SCT_ALGORITHM_MISMATCH = 2,
+ SCT_DATA_SERIALIZATION_FAILED = 3,
+ SCT_VERIFICATION_FAILED = 4,
+ };
+
// Creates a new CTLogVerifier that will verify SignedCertificateTimestamps
// using |public_key|, which is a DER-encoded SubjectPublicKeyInfo.
// If |public_key| refers to an unsupported public key, returns NULL.
@@ -43,8 +51,8 @@ class NET_EXPORT CTLogVerifier {
const std::string& description() const { return description_; }
// Verifies that |sct| contains a valid signature for |entry|.
- bool Verify(const ct::LogEntry& entry,
- const ct::SignedCertificateTimestamp& sct);
+ VerifyResult Verify(const ct::LogEntry& entry,
+ const ct::SignedCertificateTimestamp& sct);
private:
FRIEND_TEST_ALL_PREFIXES(CTLogVerifierTest, VerifySignature);
« no previous file with comments | « no previous file | net/cert/ct_log_verifier.cc » ('j') | net/cert/ct_serialization.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698