chromium/device/fido/attestation_statement_formats.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "device/fido/attestation_statement_formats.h"

#include <utility>

#include "base/logging.h"
#include "device/fido/fido_parsing_utils.h"
#include "third_party/boringssl/src/include/openssl/bytestring.h"

namespace device {

namespace {
constexpr char kFidoFormatName[] =;
constexpr char kPackedAttestationFormat[] =;
constexpr char kAlgorithmKey[] =;
constexpr char kSignatureKey[] =;
constexpr char kX509CertKey[] =;

bool IsCertificateInappropriatelyIdentifying(
    const std::vector<uint8_t>& der_bytes) {}

}  // namespace

// static
std::unique_ptr<FidoAttestationStatement>
FidoAttestationStatement::CreateFromU2fRegisterResponse(
    base::span<const uint8_t> u2f_data) {}

FidoAttestationStatement::FidoAttestationStatement(
    std::vector<uint8_t> signature,
    std::vector<std::vector<uint8_t>> x509_certificates)
    :{}

FidoAttestationStatement::~FidoAttestationStatement() = default;

cbor::Value FidoAttestationStatement::AsCBOR() const {}

bool FidoAttestationStatement::IsNoneAttestation() const {}

bool FidoAttestationStatement::IsSelfAttestation() const {}

bool FidoAttestationStatement::
    IsAttestationCertificateInappropriatelyIdentifying() const {}

std::optional<base::span<const uint8_t>>
FidoAttestationStatement::GetLeafCertificate() const {}

PackedAttestationStatement::PackedAttestationStatement(
    CoseAlgorithmIdentifier algorithm,
    std::vector<uint8_t> signature,
    std::vector<std::vector<uint8_t>> x509_certificates)
    :{}

PackedAttestationStatement::~PackedAttestationStatement() = default;

cbor::Value PackedAttestationStatement::AsCBOR() const {}

bool PackedAttestationStatement::IsNoneAttestation() const {}

bool PackedAttestationStatement::IsSelfAttestation() const {}

bool PackedAttestationStatement::
    IsAttestationCertificateInappropriatelyIdentifying() const {}

std::optional<base::span<const uint8_t>>
PackedAttestationStatement::GetLeafCertificate() const {}

}  // namespace device