// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_CERT_INTERNAL_TRUST_STORE_CHROME_H_ #define NET_CERT_INTERNAL_TRUST_STORE_CHROME_H_ #include <optional> #include <vector> #include "base/containers/flat_map.h" #include "base/containers/span.h" #include "base/time/time.h" #include "base/version.h" #include "crypto/sha2.h" #include "net/base/net_export.h" #include "net/cert/root_store_proto_lite/root_store.pb.h" #include "third_party/boringssl/src/pki/trust_store.h" #include "third_party/boringssl/src/pki/trust_store_in_memory.h" namespace net { // Represents a ConstraintSet for compiled-in version of the root store. // This is a separate struct from ChromeRootCertConstraints since the in-memory // representation parses the version constraints into a base::Version. // (base::Version can't be used in the compiled-in version since it isn't // constexpr.) struct StaticChromeRootCertConstraints { … }; struct ChromeRootCertInfo { … }; struct NET_EXPORT ChromeRootCertConstraints { … }; // ChromeRootStoreData is a container class that stores all of the Chrome Root // Store data in a single class. class NET_EXPORT ChromeRootStoreData { … }; // TrustStoreChrome contains the Chrome Root Store, as described at // https://g.co/chrome/root-policy class NET_EXPORT TrustStoreChrome : public bssl::TrustStore { … }; // Returns the version # of the Chrome Root Store that was compiled into the // binary. NET_EXPORT int64_t CompiledChromeRootStoreVersion(); // Returns the anchors of the Chrome Root Store that were compiled into the // binary. NET_EXPORT std::vector<ChromeRootStoreData::Anchor> CompiledChromeRootStoreAnchors(); } // namespace net #endif // NET_CERT_INTERNAL_TRUST_STORE_CHROME_H_