#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <inttypes.h>
#include <iostream>
#include <map>
#include <optional>
#include <set>
#include <string>
#include <string_view>
#include "base/at_exit.h"
#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/containers/span.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/path_service.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "crypto/sha2.h"
#include "net/cert/root_store_proto_full/root_store.pb.h"
#include "third_party/boringssl/src/include/openssl/bio.h"
#include "third_party/boringssl/src/include/openssl/err.h"
#include "third_party/boringssl/src/include/openssl/pem.h"
#include "third_party/protobuf/src/google/protobuf/text_format.h"
RootStore;
namespace {
std::optional<std::map<std::string, std::string>> DecodeCerts(
std::string_view in) { … }
std::optional<RootStore> ReadTextRootStore(
const base::FilePath& root_store_path,
const base::FilePath& certs_path) { … }
std::string SecondsFromEpochToBaseTime(int64_t t) { … }
std::string VersionFromString(std::string_view version_str) { … }
bool WriteRootCppFile(const RootStore& root_store,
const base::FilePath cpp_path) { … }
bool WriteEvCppFile(const RootStore& root_store,
const base::FilePath cpp_path) { … }
}
int main(int argc, char** argv) { … }