OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 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 | |
5 #ifndef NET_CERT_DO_NOTHING_CT_VERIFIER_H_ | |
6 #define NET_CERT_DO_NOTHING_CT_VERIFIER_H_ | |
7 | |
8 #include "net/base/net_export.h" | |
9 #include "net/cert/ct_verifier.h" | |
10 | |
11 namespace net { | |
12 | |
13 // An implementation of CTVerifier that does not validate SCTs. | |
14 // | |
15 // SECURITY NOTE: | |
16 // As Certificate Transparency is an essential part in safeguarding TLS | |
17 // connections, disabling Certificate Transparency enforcement is a decision | |
18 // that should not be taken lightly, and it should be made an explicit | |
19 // decision rather than a potential accidental decision (such as allowing | |
eroman
2016/12/02 01:46:22
potential accidental --> potentially accidental?
| |
20 // for a nullptr instance). By checking Certificate Transparency information, | |
21 // typically via a net::MultiLogCTVerifier, and enforcing policies related | |
22 // to Certificate Transparency provided by a net::CTPolicyEnforcer, developers | |
23 // can help protect their users by ensuring that misissued TLS certificates | |
24 // are detected. | |
25 // | |
26 // However, not every consumer of TLS certificates is using the Web PKI. For | |
27 // example, they may be using connections authenticated out of band, or may | |
28 // be using private or local PKIs for which Certificate Transparency is not | |
29 // relevant. Alternatively, as a 'healthy' client for Certificate Transparency | |
eroman
2016/12/02 01:46:22
not convinced that quotes should be included aroun
| |
30 // is one that is regularly updated, much like a 'healthy' TLS client has a | |
31 // regularly updated root certificate store, it may be intended to disable | |
32 // Certificate Transparency and opt for the less-secure interaction, due to | |
33 // concerns related to updates. | |
34 // | |
35 // As such, consumers of this class should generally try to get a security | |
36 // or design review to discuss the type of net::X509Certificates they will | |
37 // be validating, and determine whether or not Certificate Transparency is | |
38 // right for them. | |
39 // | |
40 // Because of these complex nuances, it's not unexpected that consumers of | |
eroman
2016/12/02 01:46:22
style-nit: the double negative here could be simpl
| |
41 // CTVerifiers will want to require a CTVerifier be supplied, so that the | |
eroman
2016/12/02 01:46:23
If you really want to raise eyebrows in codereview
| |
42 // caller makes an intentional decision to disable Certificate Transparency, | |
43 // rather than accidentally supplying a nullptr. This class is intended to | |
44 // indicate an intentional consideration of CT, and a decision to not | |
45 // support it, to resolve any ambiguity on intent. | |
46 class NET_EXPORT DoNothingCTVerifier : public CTVerifier { | |
47 public: | |
48 DoNothingCTVerifier(); | |
49 ~DoNothingCTVerifier() override; | |
50 | |
51 int Verify(X509Certificate* cert, | |
52 const std::string& stapled_ocsp_response, | |
53 const std::string& sct_list_from_tls_extension, | |
54 SignedCertificateTimestampAndStatusList* output_scts, | |
55 const NetLogWithSource& net_log) override; | |
56 }; | |
eroman
2016/12/02 01:46:23
DISALLOW_COPY_AND_ASSIGN ?
| |
57 | |
58 } // namespace net | |
59 | |
60 #endif // NET_CERT_DO_NOTHING_CT_VERIFIER_H_ | |
OLD | NEW |