chromium/content/browser/web_package/signed_exchange_certificate_chain.cc

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

#include "content/browser/web_package/signed_exchange_certificate_chain.h"

#include <string_view>

#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "components/cbor/reader.h"
#include "content/browser/web_package/signed_exchange_consts.h"
#include "content/browser/web_package/signed_exchange_utils.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
#include "crypto/sha2.h"
#include "net/cert/asn1_util.h"
#include "net/cert/x509_certificate.h"
#include "net/cert/x509_util.h"
#include "services/network/public/cpp/network_switches.h"

namespace content {

namespace {

// https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cert-chain-format
std::unique_ptr<SignedExchangeCertificateChain> ParseCertChain(
    base::span<const uint8_t> message,
    SignedExchangeDevToolsProxy* devtools_proxy) {}

}  // namespace

// static
std::unique_ptr<SignedExchangeCertificateChain>
SignedExchangeCertificateChain::Parse(
    base::span<const uint8_t> cert_response_body,
    SignedExchangeDevToolsProxy* devtools_proxy) {}

SignedExchangeCertificateChain::SignedExchangeCertificateChain(
    scoped_refptr<net::X509Certificate> cert,
    const std::string& ocsp,
    const std::string& sct)
    :{}

SignedExchangeCertificateChain::~SignedExchangeCertificateChain() = default;

bool SignedExchangeCertificateChain::ShouldIgnoreErrors() const {}

std::unique_ptr<SignedExchangeCertificateChain::IgnoreErrorsSPKIList>&
SignedExchangeCertificateChain::IgnoreErrorsSPKIList::GetInstance() {}

std::unique_ptr<SignedExchangeCertificateChain::IgnoreErrorsSPKIList>
SignedExchangeCertificateChain::IgnoreErrorsSPKIList::SetInstanceForTesting(
    std::unique_ptr<IgnoreErrorsSPKIList> p) {}

SignedExchangeCertificateChain::IgnoreErrorsSPKIList::IgnoreErrorsSPKIList(
    const std::string& spki_list) {}

SignedExchangeCertificateChain::IgnoreErrorsSPKIList::IgnoreErrorsSPKIList(
    const base::CommandLine& command_line) {}

void SignedExchangeCertificateChain::IgnoreErrorsSPKIList::Parse(
    const std::string& spki_list) {}

SignedExchangeCertificateChain::IgnoreErrorsSPKIList::~IgnoreErrorsSPKIList() =
    default;

// static
bool SignedExchangeCertificateChain::IgnoreErrorsSPKIList::ShouldIgnoreErrors(
    scoped_refptr<net::X509Certificate> certificate) {}

bool SignedExchangeCertificateChain::IgnoreErrorsSPKIList::
    ShouldIgnoreErrorsInternal(
        scoped_refptr<net::X509Certificate> certificate) {}

}  // namespace content