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/ct_log_verifier.h

Issue 27026002: CT: Adding preliminary Certificate Transparency support to Chromium. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Distinguish between SCTs from unknown logs and unverified ones 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 | « net/cert/cert_status_flags.h ('k') | net/cert/ct_log_verifier.cc » ('j') | no next file with comments »
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 {
+ 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 | « net/cert/cert_status_flags.h ('k') | net/cert/ct_log_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698