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

// Copyright 2019 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/cast_cert_validator.h"

#include <stddef.h>
#include <stdint.h>
#include <string.h>

#include <algorithm>
#include <memory>
#include <utility>

#include "cast/common/certificate/cast_crl.h"
#include "cast/common/public/parsed_certificate.h"
#include "cast/common/public/trust_store.h"
#include "util/osp_logging.h"

namespace openscreen::cast {
namespace {

// Returns the OID for the Audio-Only Cast policy
// (1.3.6.1.4.1.11129.2.5.2) in DER form.
static constexpr uint8_t kAudioOnlyPolicyBytes[] =;
static constexpr ByteView kAudioOnlyPolicyOid{};

CastDeviceCertPolicy GetAudioPolicy(
    const std::vector<const ParsedCertificate*>& path) {}

}  // namespace

Error VerifyDeviceCert(const std::vector<std::string>& der_certs,
                       const DateTime& time,
                       std::unique_ptr<ParsedCertificate>* target_cert,
                       CastDeviceCertPolicy* policy,
                       const CastCRL* crl,
                       CRLPolicy crl_policy,
                       TrustStore* trust_store) {}

}  // namespace openscreen::cast