#include "pc/dtls_srtp_transport.h"
#include <string.h>
#include <string>
#include <utility>
#include "api/dtls_transport_interface.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/ssl_stream_adapter.h"
namespace {
static const char kDtlsSrtpExporterLabel[] = …;
}
namespace webrtc {
DtlsSrtpTransport::DtlsSrtpTransport(bool rtcp_mux_enabled,
const FieldTrialsView& field_trials)
: … { … }
void DtlsSrtpTransport::SetDtlsTransports(
cricket::DtlsTransportInternal* rtp_dtls_transport,
cricket::DtlsTransportInternal* rtcp_dtls_transport) { … }
void DtlsSrtpTransport::SetRtcpMuxEnabled(bool enable) { … }
void DtlsSrtpTransport::UpdateSendEncryptedHeaderExtensionIds(
const std::vector<int>& send_extension_ids) { … }
void DtlsSrtpTransport::UpdateRecvEncryptedHeaderExtensionIds(
const std::vector<int>& recv_extension_ids) { … }
bool DtlsSrtpTransport::IsDtlsActive() { … }
bool DtlsSrtpTransport::IsDtlsConnected() { … }
bool DtlsSrtpTransport::IsDtlsWritable() { … }
bool DtlsSrtpTransport::DtlsHandshakeCompleted() { … }
void DtlsSrtpTransport::MaybeSetupDtlsSrtp() { … }
void DtlsSrtpTransport::SetupRtpDtlsSrtp() { … }
void DtlsSrtpTransport::SetupRtcpDtlsSrtp() { … }
bool DtlsSrtpTransport::ExtractParams(
cricket::DtlsTransportInternal* dtls_transport,
int* selected_crypto_suite,
rtc::ZeroOnFreeBuffer<unsigned char>* send_key,
rtc::ZeroOnFreeBuffer<unsigned char>* recv_key) { … }
void DtlsSrtpTransport::SetDtlsTransport(
cricket::DtlsTransportInternal* new_dtls_transport,
cricket::DtlsTransportInternal** old_dtls_transport) { … }
void DtlsSrtpTransport::SetRtpDtlsTransport(
cricket::DtlsTransportInternal* rtp_dtls_transport) { … }
void DtlsSrtpTransport::SetRtcpDtlsTransport(
cricket::DtlsTransportInternal* rtcp_dtls_transport) { … }
void DtlsSrtpTransport::OnDtlsState(cricket::DtlsTransportInternal* transport,
DtlsTransportState state) { … }
void DtlsSrtpTransport::OnWritableState(
rtc::PacketTransportInternal* packet_transport) { … }
void DtlsSrtpTransport::SetOnDtlsStateChange(
std::function<void(void)> callback) { … }
}