chromium/third_party/blink/renderer/modules/peerconnection/rtc_certificate_generator.cc

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

#include "third_party/blink/renderer/modules/peerconnection/rtc_certificate_generator.h"

#include <string>
#include <utility>

#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.h"
#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
#include "third_party/webrtc/api/scoped_refptr.h"
#include "third_party/webrtc/rtc_base/rtc_certificate.h"
#include "third_party/webrtc/rtc_base/rtc_certificate_generator.h"

namespace blink {
namespace {

// A certificate generation request spawned by
// |GenerateCertificateWithOptionalExpiration|. This
// is handled by a separate class so that reference counting can keep the
// request alive independently of the |RTCCertificateGenerator| that spawned it.
class RTCCertificateGeneratorRequest
    : public WTF::ThreadSafeRefCounted<RTCCertificateGeneratorRequest> {};

void GenerateCertificateWithOptionalExpiration(
    const rtc::KeyParams& key_params,
    const std::optional<uint64_t>& expires_ms,
    blink::RTCCertificateCallback completion_callback,
    ExecutionContext& context,
    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {}

}  // namespace

void RTCCertificateGenerator::GenerateCertificate(
    const rtc::KeyParams& key_params,
    blink::RTCCertificateCallback completion_callback,
    ExecutionContext& context,
    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {}

void RTCCertificateGenerator::GenerateCertificateWithExpiration(
    const rtc::KeyParams& key_params,
    uint64_t expires_ms,
    blink::RTCCertificateCallback completion_callback,
    ExecutionContext& context,
    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {}

bool RTCCertificateGenerator::IsSupportedKeyParams(
    const rtc::KeyParams& key_params) {}

rtc::scoped_refptr<rtc::RTCCertificate> RTCCertificateGenerator::FromPEM(
    String pem_private_key,
    String pem_certificate) {}

}  // namespace blink