#include "net/cert/ct_log_response_parser.h"
#include <memory>
#include <string_view>
#include "base/base64.h"
#include "base/json/json_value_converter.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "base/values.h"
#include "net/cert/ct_serialization.h"
#include "net/cert/signed_tree_head.h"
namespace net::ct {
namespace {
struct JsonSignedTreeHead { … };
bool ConvertSHA256RootHash(std::string_view s, std::string* result) { … }
bool ConvertTreeHeadSignature(std::string_view s, DigitallySigned* result) { … }
void JsonSignedTreeHead::RegisterJSONConverter(
base::JSONValueConverter<JsonSignedTreeHead>* converter) { … }
bool IsJsonSTHStructurallyValid(const JsonSignedTreeHead& sth) { … }
struct JsonConsistencyProof { … };
bool ConvertIndividualProofNode(const base::Value* value, std::string* result) { … }
void JsonConsistencyProof::RegisterJSONConverter(
base::JSONValueConverter<JsonConsistencyProof>* converter) { … }
}
bool FillSignedTreeHead(const base::Value& json_signed_tree_head,
SignedTreeHead* signed_tree_head) { … }
bool FillConsistencyProof(const base::Value& json_consistency_proof,
std::vector<std::string>* consistency_proof) { … }
}