OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_CERT_CT_KNOWN_LOGS_H_ | 5 #ifndef NET_CERT_CT_KNOWN_LOGS_H_ |
6 #define NET_CERT_CT_KNOWN_LOGS_H_ | 6 #define NET_CERT_CT_KNOWN_LOGS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
14 | 14 |
| 15 namespace base { |
| 16 class Time; |
| 17 } // namespace base |
| 18 |
15 namespace net { | 19 namespace net { |
16 | 20 |
17 class CTLogVerifier; | 21 class CTLogVerifier; |
18 | 22 |
19 namespace ct { | 23 namespace ct { |
20 | 24 |
21 #if !defined(OS_NACL) | 25 #if !defined(OS_NACL) |
22 // CreateLogVerifiersForKnownLogs returns a vector of CT logs for all the known | 26 // CreateLogVerifiersForKnownLogs returns a vector of CT logs for all the known |
23 // and trusted logs. | 27 // logs. This set includes logs that are presently qualified for inclusion and |
| 28 // logs which were previously qualifying, but have since been removed. To |
| 29 // determine the status of a given log, use |IsLogDisqualified()|. |
24 NET_EXPORT std::vector<scoped_refptr<const CTLogVerifier>> | 30 NET_EXPORT std::vector<scoped_refptr<const CTLogVerifier>> |
25 CreateLogVerifiersForKnownLogs(); | 31 CreateLogVerifiersForKnownLogs(); |
26 #endif | 32 #endif |
27 | 33 |
28 NET_EXPORT bool IsLogOperatedByGoogle(base::StringPiece log_id); | 34 NET_EXPORT bool IsLogOperatedByGoogle(base::StringPiece log_id); |
29 | 35 |
| 36 // Returns true if the CT log identified by |log_id| has been disqualified |
| 37 // from inclusion, and sets |*disqualification_date| to the date of |
| 38 // disqualification. Any SCTs which have embedded in certificates issued |
| 39 // after this date should not count towards any uniqueness/freshness |
| 40 // requirements. |
| 41 NET_EXPORT bool IsLogDisqualified(base::StringPiece log_id, |
| 42 base::Time* disqualification_date); |
| 43 |
30 } // namespace ct | 44 } // namespace ct |
31 | 45 |
32 } // namespace net | 46 } // namespace net |
33 | 47 |
34 #endif // NET_CERT_CT_KNOWN_LOGS_H_ | 48 #endif // NET_CERT_CT_KNOWN_LOGS_H_ |
OLD | NEW |