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

Unified Diff: net/cert/single_log_ct_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/ct_verify_result.cc ('k') | net/cert/single_log_ct_verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/single_log_ct_verifier.h
diff --git a/net/cert/single_log_ct_verifier.h b/net/cert/single_log_ct_verifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..f111ce9a141960ace036a35b46193aa6df347d27
--- /dev/null
+++ b/net/cert/single_log_ct_verifier.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_CERT_SINGLE_LOG_CT_VERIFIER_H_
+#define NET_CERT_SINGLE_LOG_CT_VERIFIER_H_
+
+#include <string>
+
+#include "base/memory/scoped_ptr.h"
+#include "net/base/net_export.h"
+#include "net/cert/ct_verifier.h"
+
+namespace net {
+
+namespace ct {
+struct LogEntry;
+} // namespace ct
+class CTLogVerifier;
+
+class NET_EXPORT SingleLogCTVerifier : public CTVerifier {
+ public:
+ explicit SingleLogCTVerifier(scoped_ptr<CTLogVerifier> log_verifier);
+ virtual ~SingleLogCTVerifier();
+
+ // CTVerifier implementation:
+ virtual int Verify(X509Certificate* cert,
+ X509Certificate* verified_cert,
+ ct::CTVerifyResult* result,
+ const CompletionCallback& callback,
+ const BoundNetLog& net_log) OVERRIDE;
+
+ private:
+ SingleLogCTVerifier();
+
+ bool VerifySCTs(const std::string& encoded_sct_list,
+ const ct::LogEntry& expected_entry,
+ ct::CTVerifyResult* result);
+
+ scoped_ptr<CTLogVerifier> log_;
+
+ DISALLOW_COPY_AND_ASSIGN(SingleLogCTVerifier);
+};
+
+} // namespace net
+
+#endif // NET_CERT_SINGLE_LOG_CT_VERIFIER_H_
« no previous file with comments | « net/cert/ct_verify_result.cc ('k') | net/cert/single_log_ct_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698