chromium/third_party/openscreen/src/cast/common/certificate/boringssl_parsed_certificate.cc

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

#include "cast/common/certificate/boringssl_parsed_certificate.h"

#include <openssl/x509v3.h>

#include <cstring>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "cast/common/certificate/boringssl_util.h"
#include "util/crypto/certificate_utils.h"
#include "util/osp_logging.h"

namespace openscreen::cast {
namespace {

const EVP_MD* MapDigestAlgorithm(DigestAlgorithm algorithm) {}

}  // namespace

// static
ErrorOr<std::unique_ptr<ParsedCertificate>> ParsedCertificate::ParseFromDER(
    const std::vector<uint8_t>& der_cert) {}

BoringSSLParsedCertificate::BoringSSLParsedCertificate() = default;

BoringSSLParsedCertificate::BoringSSLParsedCertificate(
    bssl::UniquePtr<X509> cert)
    :{}

BoringSSLParsedCertificate::~BoringSSLParsedCertificate() = default;

ErrorOr<std::vector<uint8_t>> BoringSSLParsedCertificate::SerializeToDER(
    int front_spacing) const {}

ErrorOr<DateTime> BoringSSLParsedCertificate::GetNotBeforeTime() const {}

ErrorOr<DateTime> BoringSSLParsedCertificate::GetNotAfterTime() const {}

std::string BoringSSLParsedCertificate::GetCommonName() const {}

std::string BoringSSLParsedCertificate::GetSpkiTlv() const {}

ErrorOr<uint64_t> BoringSSLParsedCertificate::GetSerialNumber() const {}

bool BoringSSLParsedCertificate::VerifySignedData(
    DigestAlgorithm algorithm,
    const ByteView& data,
    const ByteView& signature) const {}

bool BoringSSLParsedCertificate::HasPolicyOid(const ByteView& oid) const {}

void BoringSSLParsedCertificate::SetNotBeforeTimeForTesting(time_t not_before) {}

void BoringSSLParsedCertificate::SetNotAfterTimeForTesting(time_t not_after) {}

}  // namespace openscreen::cast