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

Side by Side Diff: net/cert/cert_policy_enforcer.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « net/cert/cert_database_win.cc ('k') | net/cert/cert_policy_enforcer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #ifndef NET_CERT_CERT_POLICY_ENFORCER_H
5 #define NET_CERT_CERT_POLICY_ENFORCER_H
6
7 #include <stddef.h>
8
9 #include "net/base/net_export.h"
10 #include "net/base/net_log.h"
11
12 namespace net {
13
14 namespace ct {
15
16 struct CTVerifyResult;
17 class EVCertsWhitelist;
18
19 } // namespace ct
20
21 class X509Certificate;
22
23 // Class for checking that a given certificate conforms to security-related
24 // policies.
25 class NET_EXPORT CertPolicyEnforcer {
26 public:
27 // Set the parameters for this policy enforcer:
28 // |require_ct_for_ev| indicates whether Certificate Transparency presence
29 // is required for EV certificates.
30 explicit CertPolicyEnforcer(bool require_ct_for_ev);
31 virtual ~CertPolicyEnforcer();
32
33 // Returns true if the collection of SCTs for the given certificate
34 // conforms with the CT/EV policy. Conformance details are logged to
35 // |net_log|.
36 // |cert| is the certificate for which the SCTs apply.
37 // |ct_result| must contain the result of verifying any SCTs associated with
38 // |cert| prior to invoking this method.
39 bool DoesConformToCTEVPolicy(X509Certificate* cert,
40 const ct::EVCertsWhitelist* ev_whitelist,
41 const ct::CTVerifyResult& ct_result,
42 const BoundNetLog& net_log);
43
44 private:
45 bool require_ct_for_ev_;
46 };
47
48 } // namespace net
49
50 #endif // NET_CERT_CERT_POLICY_ENFORCER_H
OLDNEW
« no previous file with comments | « net/cert/cert_database_win.cc ('k') | net/cert/cert_policy_enforcer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698