chromium/components/web_package/signed_web_bundles/ecdsa_p256_utils_unittest.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/web_package/signed_web_bundles/ecdsa_p256_utils.h"

#include <array>
#include <vector>

#include "base/containers/span.h"
#include "base/test/gmock_expected_support.h"
#include "components/web_package/signed_web_bundles/ecdsa_p256_public_key.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace web_package {

namespace {

constexpr std::string_view kMessage =;
constexpr std::string_view kOtherMessage =;

// Valid ECDSA P-256 signature.
constexpr std::array<uint8_t, EcdsaP256PublicKey::kLength> kEcdsaP256PublicKey =;

// Valid ECDSA P-256 signature, corresponding to a SHA-256 hash of `kMessage`
// signed by `kEdcsaP256PublicKey`.
constexpr std::array<uint8_t, 72> kEcdsa256Signature =;

// `kEcdsa256Signature` with the first byte changed to 0x04 (invalid).
constexpr std::array<uint8_t, 72> kInvalidSignature =;

}  // namespace

TEST(EcdsaP256UtilsTest, VerifyMessageSignedWithEcdsaP256SHA256) {}

}  // namespace web_package