pref_names.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #ifndef COMPONENTS_CERTIFICATE_TRANSPARENCY_PREF_NAMES_H_
  5. #define COMPONENTS_CERTIFICATE_TRANSPARENCY_PREF_NAMES_H_
  6. #include "base/component_export.h"
  7. class PrefRegistrySimple;
  8. namespace certificate_transparency {
  9. namespace prefs {
  10. // Registers the preferences related to Certificate Transparency policy
  11. // in the given pref registry.
  12. COMPONENT_EXPORT(CERTIFICATE_TRANSPARENCY)
  13. void RegisterPrefs(PrefRegistrySimple* registry);
  14. // The set of hosts (as URLBlocklist-syntax filters) for which Certificate
  15. // Transparency is required to be present.
  16. COMPONENT_EXPORT(CERTIFICATE_TRANSPARENCY) extern const char kCTRequiredHosts[];
  17. // The set of hosts (as URLBlocklist-syntax filters) for which Certificate
  18. // Transparency information is allowed to be absent, even if it would
  19. // otherwise be required (e.g. as part of security policy).
  20. COMPONENT_EXPORT(CERTIFICATE_TRANSPARENCY) extern const char kCTExcludedHosts[];
  21. // The set of subjectPublicKeyInfo hashes in the form of
  22. // <hash-name>"/"<base64-hash-value>. If a certificate matches this SPKI, then
  23. // Certificate Transparency information is allowed to be absent if one of the
  24. // following conditions are met:
  25. // 1) The matching certificate is a CA certificate (basicConstraints CA:TRUE)
  26. // that has a nameConstraints extension with a permittedSubtrees that
  27. // contains one or more directoryName entries, the directoryName has
  28. // one or more organizationName attributes, and the leaf certificate also
  29. // contains one or more organizationName attributes in the Subject.
  30. // 2) The matching certificate contains one or more organizationName
  31. // attributes in the Subject, and those attributes are identical in
  32. // ordering, number of values, and byte-for-byte equality of values.
  33. COMPONENT_EXPORT(CERTIFICATE_TRANSPARENCY) extern const char kCTExcludedSPKIs[];
  34. // The set of subjectPublicKeyInfo hashes in the form of
  35. // <hash-name>"/"<base64-hash-value>. If a certificate matches this SPKI, then
  36. // Certificate Transparency information is allowed to be absent if:
  37. // 1) The SPKI listed is a known as a publicly trusted root
  38. // (see //net/data/ssl/root_stores)
  39. // 2) The SPKI listed is not actively trusted in the current version of the
  40. // ChromiumOS or Android root stores.
  41. // (see '"legacy": true' in root_stores.json)
  42. COMPONENT_EXPORT(CERTIFICATE_TRANSPARENCY)
  43. extern const char kCTExcludedLegacySPKIs[];
  44. } // namespace prefs
  45. } // namespace certificate_transparency
  46. #endif // COMPONENTS_CERTIFICATE_TRANSPARENCY_PREF_NAMES_H_