Index: net/cert/ct_verifier.h |
diff --git a/net/cert/ct_verifier.h b/net/cert/ct_verifier.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d9995224e5c6d72649fddeb5e5b0b595f46e8d16 |
--- /dev/null |
+++ b/net/cert/ct_verifier.h |
@@ -0,0 +1,41 @@ |
+// 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_CT_VERIFIER_H_ |
+#define NET_CERT_CT_VERIFIER_H_ |
+ |
+#include "net/base/completion_callback.h" |
+#include "net/base/net_export.h" |
+ |
+namespace net { |
+ |
+namespace ct { |
+struct CTVerifyResult; |
+} // namespace ct |
+ |
+class BoundNetLog; |
+class X509Certificate; |
+ |
+// High-level interface for verifying Signed Certificate Timestamps |
+// over a certificate. |
+class NET_EXPORT CTVerifier { |
+ public: |
+ virtual ~CTVerifier() {} |
+ |
+ // Verifies either embedded SCTs or SCTs obtained via TLS handshake/ |
+ // OCSP stapling on the given |verified_cert| |
+ // |result| will be filled with these SCTs, divided into categories based on |
+ // the verification result. |
+ virtual int Verify(X509Certificate* verified_cert, |
+ const std::string& sct_list_from_ocsp, |
+ const std::string& sct_list_from_tls_handshake, |
+ ct::CTVerifyResult* result, |
+ const CompletionCallback& callback, |
+ const BoundNetLog& net_log) = 0; |
+ |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_CERT_CT_VERIFIER_H_ |