summaryrefslogtreecommitdiff
path: root/chromium/net/cert/ct_policy_enforcer.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-01-25 11:39:07 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-01-25 15:20:42 +0000
commit6c91641271e536ffaa88a1dff5127e42ee99a91e (patch)
tree703d9dd49602377ddc90cbf886aad37913f2496b /chromium/net/cert/ct_policy_enforcer.h
parentb145b7fafd36f0c260d6a768c81fc14e32578099 (diff)
downloadqtwebengine-chromium-6c91641271e536ffaa88a1dff5127e42ee99a91e.tar.gz
BASELINE: Update Chromium to 49.0.2623.23
Also adds missing printing sources. Change-Id: I3726b8f0c7d6751c9fc846096c571fadca7108cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/net/cert/ct_policy_enforcer.h')
-rw-r--r--chromium/net/cert/ct_policy_enforcer.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/chromium/net/cert/ct_policy_enforcer.h b/chromium/net/cert/ct_policy_enforcer.h
new file mode 100644
index 00000000000..8c29da5ecb3
--- /dev/null
+++ b/chromium/net/cert/ct_policy_enforcer.h
@@ -0,0 +1,44 @@
+// Copyright 2014 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_POLICY_ENFORCER_H
+#define NET_CERT_CT_POLICY_ENFORCER_H
+
+#include <stddef.h>
+
+#include "net/base/net_export.h"
+#include "net/log/net_log.h"
+
+namespace net {
+
+namespace ct {
+
+struct CTVerifyResult;
+class EVCertsWhitelist;
+
+} // namespace ct
+
+class X509Certificate;
+
+// Class for checking that a given certificate conforms to security-related
+// policies.
+class NET_EXPORT CTPolicyEnforcer {
+ public:
+ CTPolicyEnforcer() {}
+ virtual ~CTPolicyEnforcer() {}
+
+ // Returns true if the collection of SCTs for the given certificate
+ // conforms with the CT/EV policy. Conformance details are logged to
+ // |net_log|.
+ // |cert| is the certificate for which the SCTs apply.
+ // |ct_result| must contain the result of verifying any SCTs associated with
+ // |cert| prior to invoking this method.
+ virtual bool DoesConformToCTEVPolicy(X509Certificate* cert,
+ const ct::EVCertsWhitelist* ev_whitelist,
+ const ct::CTVerifyResult& ct_result,
+ const BoundNetLog& net_log);
+};
+
+} // namespace net
+
+#endif // NET_CERT_CT_POLICY_ENFORCER_H