Remove enable_dtls_srtp option
This is part of the removal of support for SDES. Bug: webrtc:11066 Change-Id: I448d0e0032672c04c87b00550ab4b9d792071a0b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234864 Reviewed-by: Henrik Boström <hbos@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35262}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
aaa848e078
commit
f9e502d935
@ -710,13 +710,16 @@ class PeerConnectionInterfaceBaseTest : public ::testing::Test {
|
||||
CreatePeerConnection(PeerConnectionInterface::RTCConfiguration());
|
||||
}
|
||||
|
||||
// DTLS does not work in a loopback call, so is disabled for most of the
|
||||
// DTLS does not work in a loopback call, so is disabled for many
|
||||
// tests in this file.
|
||||
void CreatePeerConnectionWithoutDtls() {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = false;
|
||||
|
||||
PeerConnectionFactoryInterface::Options options;
|
||||
options.disable_encryption = true;
|
||||
pc_factory_->SetOptions(options);
|
||||
CreatePeerConnection(config);
|
||||
options.disable_encryption = false;
|
||||
pc_factory_->SetOptions(options);
|
||||
}
|
||||
|
||||
void CreatePeerConnectionWithIceTransportsType(
|
||||
@ -751,10 +754,10 @@ class PeerConnectionInterfaceBaseTest : public ::testing::Test {
|
||||
// false.
|
||||
std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator;
|
||||
|
||||
if (config.enable_dtls_srtp.value_or(true)) {
|
||||
fake_certificate_generator_ = new FakeRTCCertificateGenerator();
|
||||
cert_generator.reset(fake_certificate_generator_);
|
||||
}
|
||||
// These won't be used if encryption is turned off, but that's harmless.
|
||||
fake_certificate_generator_ = new FakeRTCCertificateGenerator();
|
||||
cert_generator.reset(fake_certificate_generator_);
|
||||
|
||||
RTCConfiguration modified_config = config;
|
||||
modified_config.sdp_semantics = sdp_semantics_;
|
||||
pc_ = pc_factory_->CreatePeerConnection(
|
||||
@ -1903,7 +1906,6 @@ TEST_P(PeerConnectionInterfaceTest, GetRTCStatsBeforeAndAfterCalling) {
|
||||
// DataChannelInit configurations.
|
||||
TEST_P(PeerConnectionInterfaceTest, CreateSctpDataChannel) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
|
||||
webrtc::DataChannelInit config;
|
||||
@ -1939,7 +1941,6 @@ TEST_P(PeerConnectionInterfaceTest, CreateSctpDataChannel) {
|
||||
// and maxRetransmitTime by setting them to -1 to get what they want.
|
||||
TEST_P(PeerConnectionInterfaceTest, CreateSctpDataChannelWithMinusOne) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
|
||||
webrtc::DataChannelInit config;
|
||||
@ -1955,7 +1956,6 @@ TEST_P(PeerConnectionInterfaceTest, CreateSctpDataChannelWithMinusOne) {
|
||||
TEST_P(PeerConnectionInterfaceTest,
|
||||
CreateSctpDataChannelShouldFailForInvalidConfig) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
|
||||
std::string label = "test";
|
||||
@ -1973,7 +1973,6 @@ TEST_P(PeerConnectionInterfaceTest,
|
||||
TEST_P(PeerConnectionInterfaceTest,
|
||||
CreateSctpDataChannelWithInvalidIdShouldFail) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
|
||||
webrtc::DataChannelInit config;
|
||||
@ -2003,7 +2002,6 @@ TEST_P(PeerConnectionInterfaceTest,
|
||||
// Verifies that duplicated label is allowed for SCTP data channel.
|
||||
TEST_P(PeerConnectionInterfaceTest, SctpDuplicatedLabelAllowed) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
|
||||
std::string label = "test";
|
||||
@ -2051,7 +2049,6 @@ TEST_P(PeerConnectionInterfaceTest, DISABLED_TestRejectSctpDataChannelInAnswer)
|
||||
// the answer as a local description.
|
||||
TEST_P(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
AddAudioTrack("audio_label");
|
||||
AddVideoTrack("video_label");
|
||||
@ -2085,7 +2082,6 @@ TEST_P(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) {
|
||||
// and because it's non-standard.
|
||||
TEST_P(PeerConnectionInterfaceTest, DtlsSdesFallbackNotSupported) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
// Wait for fake certificate to be generated. Previously, this is what caused
|
||||
// the "a=crypto" lines to be rejected.
|
||||
@ -2129,7 +2125,6 @@ TEST_P(PeerConnectionInterfaceTest, ReceiveUpdatedAudioOfferWithBadCodecs) {
|
||||
// will have m-lines with a=recvonly.
|
||||
TEST_P(PeerConnectionInterfaceTest, CreateSubsequentRecvOnlyOffer) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
CreateAndSetRemoteOffer(GetSdpStringWithStream1());
|
||||
CreateAnswerAsLocalDescription();
|
||||
@ -2155,7 +2150,6 @@ TEST_P(PeerConnectionInterfaceTest, CreateSubsequentRecvOnlyOffer) {
|
||||
// false, the generated m-lines will be a=inactive.
|
||||
TEST_P(PeerConnectionInterfaceTest, CreateSubsequentInactiveOffer) {
|
||||
RTCConfiguration rtc_config;
|
||||
rtc_config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(rtc_config);
|
||||
CreateAndSetRemoteOffer(GetSdpStringWithStream1());
|
||||
CreateAnswerAsLocalDescription();
|
||||
@ -2508,7 +2502,6 @@ TEST_P(PeerConnectionInterfaceTest, CloseAndGetStats) {
|
||||
// signaled.
|
||||
TEST_P(PeerConnectionInterfaceTest, UpdateRemoteStreams) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(GetSdpStringWithStream1());
|
||||
|
||||
@ -2534,7 +2527,6 @@ TEST_P(PeerConnectionInterfaceTest, UpdateRemoteStreams) {
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
AddRemoveTrackFromExistingRemoteMediaStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
std::unique_ptr<SessionDescriptionInterface> desc_ms1 =
|
||||
CreateSessionDescriptionAndReference(1, 1);
|
||||
@ -2577,7 +2569,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
// that rejects the media content type.
|
||||
TEST_P(PeerConnectionInterfaceTest, RejectMediaContent) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
// First create and set a remote offer, then reject its video content in our
|
||||
// answer.
|
||||
@ -2626,7 +2617,6 @@ TEST_P(PeerConnectionInterfaceTest, RejectMediaContent) {
|
||||
// Don't run under Unified Plan since the stream API is not available.
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB, RemoveTrackThenRejectMediaContent) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(GetSdpStringWithStream1());
|
||||
MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0);
|
||||
@ -2652,7 +2642,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB, RemoveTrackThenRejectMediaContent) {
|
||||
// See: https://code.google.com/p/webrtc/issues/detail?id=5054
|
||||
TEST_P(PeerConnectionInterfaceTest, RecvonlyDescriptionDoesntCreateStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
|
||||
std::string recvonly_offer = GetSdpStringWithStream1();
|
||||
@ -2669,7 +2658,6 @@ TEST_P(PeerConnectionInterfaceTest, RecvonlyDescriptionDoesntCreateStream) {
|
||||
// Don't run under Unified Plan since this behavior is Plan B specific.
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB, SdpWithoutMsidCreatesDefaultStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(kSdpStringWithoutStreamsAudioOnly);
|
||||
|
||||
@ -2698,7 +2686,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB, SdpWithoutMsidCreatesDefaultStream) {
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
SendOnlySdpWithoutMsidCreatesDefaultStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(kSdpStringSendOnlyWithoutStreams);
|
||||
|
||||
@ -2715,7 +2702,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
// Don't run under Unified Plan since this behavior is Plan B specific.
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB, RemoveAlreadyGoneRemoteStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(GetSdpStringWithStream1());
|
||||
MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0);
|
||||
@ -2734,7 +2720,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB, RemoveAlreadyGoneRemoteStream) {
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
SdpWithoutMsidAndStreamsCreatesDefaultStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(kSdpStringWithoutStreams);
|
||||
|
||||
@ -2749,7 +2734,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
// Don't run under Unified Plan since this behavior is Plan B specific.
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB, SdpWithMsidDontCreatesDefaultStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(kSdpStringWithMsidWithoutStreams);
|
||||
EXPECT_EQ(0u, observer_.remote_streams()->count());
|
||||
@ -2762,7 +2746,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB, SdpWithMsidDontCreatesDefaultStream) {
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
DefaultTracksNotDestroyedAndRecreated) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(kSdpStringWithoutStreamsAudioOnly);
|
||||
|
||||
@ -2783,7 +2766,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
// Don't run under Unified Plan since this behavior is Plan B specific.
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB, VerifyDefaultStreamIsNotCreated) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(GetSdpStringWithStream1());
|
||||
rtc::scoped_refptr<StreamCollection> reference(CreateStreamCollection(1, 1));
|
||||
@ -2799,7 +2781,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB, VerifyDefaultStreamIsNotCreated) {
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
SdpWithMsidWithoutSsrcCreatesDefaultStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
std::string sdp_string = kSdpStringWithoutStreamsAudioOnly;
|
||||
// Add a=msid lines to simulate a Unified Plan endpoint that only
|
||||
@ -2822,7 +2803,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
SdpWithEmptyMsidAndSsrcCreatesDefaultStreamId) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
// Add a a=msid line to the SDP. This is prioritized when parsing the SDP, so
|
||||
// the sender's stream ID will be interpreted as no stream IDs.
|
||||
@ -2860,7 +2840,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
// Don't run under Unified Plan since this behavior is Plan B specific.
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB, LocalDescriptionChanged) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
|
||||
// Create an offer with 1 stream with 2 tracks of each type.
|
||||
@ -2899,7 +2878,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB, LocalDescriptionChanged) {
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
AddLocalStreamAfterLocalDescriptionChanged) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
|
||||
rtc::scoped_refptr<StreamCollection> stream_collection =
|
||||
@ -2928,7 +2906,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
TEST_P(PeerConnectionInterfaceTest,
|
||||
ChangeSsrcOnTrackInLocalSessionDescription) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
|
||||
AddAudioTrack(kAudioTracks[0]);
|
||||
@ -2981,7 +2958,6 @@ TEST_P(PeerConnectionInterfaceTest,
|
||||
TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
SignalSameTracksInSeparateMediaStream) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
|
||||
rtc::scoped_refptr<StreamCollection> stream_collection =
|
||||
@ -3018,7 +2994,6 @@ TEST_F(PeerConnectionInterfaceTestPlanB,
|
||||
// This tests that PeerConnectionObserver::OnAddTrack is correctly called.
|
||||
TEST_P(PeerConnectionInterfaceTest, OnAddTrackCallback) {
|
||||
RTCConfiguration config;
|
||||
config.enable_dtls_srtp = true;
|
||||
CreatePeerConnection(config);
|
||||
CreateAndSetRemoteOffer(kSdpStringWithStream1AudioTrackOnly);
|
||||
EXPECT_EQ(observer_.num_added_tracks_, 1);
|
||||
|
||||
Reference in New Issue
Block a user