#include "components/web_package/signed_web_bundles/signature_entry_parser.h"
#include "base/containers/extend.h"
#include "base/containers/map_util.h"
#include "base/strings/stringprintf.h"
#include "base/types/expected_macros.h"
#include "components/web_package/input_reader.h"
#include "components/web_package/signed_web_bundles/attribute_map_parser.h"
#include "components/web_package/signed_web_bundles/constants.h"
#include "components/web_package/signed_web_bundles/ecdsa_p256_public_key.h"
#include "components/web_package/signed_web_bundles/ecdsa_p256_sha256_signature.h"
#include "components/web_package/signed_web_bundles/ed25519_public_key.h"
#include "components/web_package/signed_web_bundles/ed25519_signature.h"
#include "components/web_package/signed_web_bundles/integrity_block_parser.h"
#include "components/web_package/signed_web_bundles/types.h"
#include "third_party/boringssl/src/include/openssl/curve25519.h"
namespace web_package {
namespace {
SignatureType;
std::pair<SignatureType, BinaryData> GetSignatureType(
const AttributesMap& attributes_map) { … }
}
SignatureStackEntryParser::SignatureStackEntryParser(
mojom::BundleDataSource& data_source,
SignatureEntryParsedCallback callback)
: … { … }
SignatureStackEntryParser::~SignatureStackEntryParser() = default;
void SignatureStackEntryParser::Parse(uint64_t offset_in_stream) { … }
void SignatureStackEntryParser::ReadSignatureStructure(
const std::optional<BinaryData>& data) { … }
void SignatureStackEntryParser::GetAttributesMap(
AttributeMapParser::ParsingResult result) { … }
void SignatureStackEntryParser::ReadAttributesMapBytes(
uint64_t num_bytes,
const std::optional<BinaryData>& data) { … }
void SignatureStackEntryParser::ReadSignatureHeader(
const std::optional<BinaryData>& data) { … }
void SignatureStackEntryParser::ReadSignatureValue(
const std::optional<BinaryData>& data) { … }
void SignatureStackEntryParser::EvaluateSignatureEntry(
BinaryData signature_bytes) { … }
void SignatureStackEntryParser::RunErrorCallback(std::string message) { … }
}