OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1352 bool dtls1 = !!(flags1_in & DTLS); | 1352 bool dtls1 = !!(flags1_in & DTLS); |
1353 bool dtls2 = !!(flags2_in & DTLS); | 1353 bool dtls2 = !!(flags2_in & DTLS); |
1354 CreateChannels(flags1, flags2); | 1354 CreateChannels(flags1, flags2); |
1355 EXPECT_FALSE(channel1_->secure()); | 1355 EXPECT_FALSE(channel1_->secure()); |
1356 EXPECT_FALSE(channel2_->secure()); | 1356 EXPECT_FALSE(channel2_->secure()); |
1357 EXPECT_TRUE(SendInitiate()); | 1357 EXPECT_TRUE(SendInitiate()); |
1358 WaitForThreads(); | 1358 WaitForThreads(); |
1359 EXPECT_TRUE(channel1_->writable()); | 1359 EXPECT_TRUE(channel1_->writable()); |
1360 EXPECT_TRUE(channel2_->writable()); | 1360 EXPECT_TRUE(channel2_->writable()); |
1361 EXPECT_TRUE(SendAccept()); | 1361 EXPECT_TRUE(SendAccept()); |
1362 WaitForThreads(); | |
pthatcher1
2017/03/21 07:07:06
This could use a comment explaining why it's neede
joachim
2017/03/23 00:04:33
This is no longer needed now.
| |
1362 EXPECT_TRUE(channel1_->secure()); | 1363 EXPECT_TRUE(channel1_->secure()); |
1363 EXPECT_TRUE(channel2_->secure()); | 1364 EXPECT_TRUE(channel2_->secure()); |
1364 EXPECT_EQ(dtls1 && dtls2, channel1_->secure_dtls()); | 1365 EXPECT_EQ(dtls1 && dtls2, channel1_->secure_dtls()); |
1365 EXPECT_EQ(dtls1 && dtls2, channel2_->secure_dtls()); | 1366 EXPECT_EQ(dtls1 && dtls2, channel2_->secure_dtls()); |
1366 // We can only query the negotiated cipher suite for DTLS-SRTP transport | 1367 // We can only query the negotiated cipher suite for DTLS-SRTP transport |
1367 // channels. | 1368 // channels. |
1368 if (dtls1 && dtls2) { | 1369 if (dtls1 && dtls2) { |
1369 // A GCM cipher is only used if both channels support GCM ciphers. | 1370 // A GCM cipher is only used if both channels support GCM ciphers. |
1370 int common_gcm_flags = flags1 & flags2 & GCM_CIPHER; | 1371 int common_gcm_flags = flags1 & flags2 & GCM_CIPHER; |
1371 EXPECT_TRUE(CheckGcmCipher(channel1_.get(), common_gcm_flags)); | 1372 EXPECT_TRUE(CheckGcmCipher(channel1_.get(), common_gcm_flags)); |
(...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3785 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, | 3786 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, |
3786 &fake_rtcp_dtls_transport_)); | 3787 &fake_rtcp_dtls_transport_)); |
3787 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, | 3788 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, |
3788 &fake_rtp_dtls_transport_), | 3789 &fake_rtp_dtls_transport_), |
3789 ""); | 3790 ""); |
3790 } | 3791 } |
3791 | 3792 |
3792 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 3793 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
3793 | 3794 |
3794 // TODO(pthatcher): TestSetReceiver? | 3795 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |