#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 {
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) { … }
}
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) { … }
}