| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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 |
| 11 #include <algorithm> |
| 11 #include <memory> | 12 #include <memory> |
| 12 #include <set> | 13 #include <set> |
| 13 | 14 |
| 14 #include "webrtc/p2p/base/dtlstransportchannel.h" | 15 #include "webrtc/p2p/base/dtlstransport.h" |
| 15 #include "webrtc/p2p/base/fakeicetransport.h" | 16 #include "webrtc/p2p/base/fakeicetransport.h" |
| 16 #include "webrtc/p2p/base/packettransportinternal.h" | 17 #include "webrtc/p2p/base/packettransportinternal.h" |
| 17 #include "webrtc/rtc_base/checks.h" | 18 #include "webrtc/rtc_base/checks.h" |
| 18 #include "webrtc/rtc_base/dscp.h" | 19 #include "webrtc/rtc_base/dscp.h" |
| 19 #include "webrtc/rtc_base/gunit.h" | 20 #include "webrtc/rtc_base/gunit.h" |
| 20 #include "webrtc/rtc_base/helpers.h" | 21 #include "webrtc/rtc_base/helpers.h" |
| 21 #include "webrtc/rtc_base/ssladapter.h" | 22 #include "webrtc/rtc_base/ssladapter.h" |
| 22 #include "webrtc/rtc_base/sslidentity.h" | 23 #include "webrtc/rtc_base/sslidentity.h" |
| 23 #include "webrtc/rtc_base/sslstreamadapter.h" | 24 #include "webrtc/rtc_base/sslstreamadapter.h" |
| 24 #include "webrtc/rtc_base/stringutils.h" | 25 #include "webrtc/rtc_base/stringutils.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 62 |
| 62 using cricket::ConnectionRole; | 63 using cricket::ConnectionRole; |
| 63 | 64 |
| 64 enum Flags { NF_REOFFER = 0x1, NF_EXPECT_FAILURE = 0x2 }; | 65 enum Flags { NF_REOFFER = 0x1, NF_EXPECT_FAILURE = 0x2 }; |
| 65 | 66 |
| 66 // TODO(deadbeef): Remove the dependency on JsepTransport. This test should be | 67 // TODO(deadbeef): Remove the dependency on JsepTransport. This test should be |
| 67 // testing DtlsTransportChannel by itself, calling methods to set the | 68 // testing DtlsTransportChannel by itself, calling methods to set the |
| 68 // configuration directly instead of negotiating TransportDescriptions. | 69 // configuration directly instead of negotiating TransportDescriptions. |
| 69 class DtlsTestClient : public sigslot::has_slots<> { | 70 class DtlsTestClient : public sigslot::has_slots<> { |
| 70 public: | 71 public: |
| 71 DtlsTestClient(const std::string& name) : name_(name) {} | 72 explicit DtlsTestClient(const std::string& name) : name_(name) {} |
| 72 void CreateCertificate(rtc::KeyType key_type) { | 73 void CreateCertificate(rtc::KeyType key_type) { |
| 73 certificate_ = | 74 certificate_ = |
| 74 rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>( | 75 rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>( |
| 75 rtc::SSLIdentity::Generate(name_, key_type))); | 76 rtc::SSLIdentity::Generate(name_, key_type))); |
| 76 } | 77 } |
| 77 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate() { | 78 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate() { |
| 78 return certificate_; | 79 return certificate_; |
| 79 } | 80 } |
| 80 void SetupMaxProtocolVersion(rtc::SSLProtocolVersion version) { | 81 void SetupMaxProtocolVersion(rtc::SSLProtocolVersion version) { |
| 81 ssl_max_version_ = version; | 82 ssl_max_version_ = version; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 for (const auto& dtls : dtls_transports_) { | 128 for (const auto& dtls : dtls_transports_) { |
| 128 if (dtls->component() == component) { | 129 if (dtls->component() == component) { |
| 129 return dtls.get(); | 130 return dtls.get(); |
| 130 } | 131 } |
| 131 } | 132 } |
| 132 return nullptr; | 133 return nullptr; |
| 133 } | 134 } |
| 134 | 135 |
| 135 // Offer DTLS if we have an identity; pass in a remote fingerprint only if | 136 // Offer DTLS if we have an identity; pass in a remote fingerprint only if |
| 136 // both sides support DTLS. | 137 // both sides support DTLS. |
| 137 void Negotiate(DtlsTestClient* peer, cricket::ContentAction action, | 138 void Negotiate(DtlsTestClient* peer, |
| 138 ConnectionRole local_role, ConnectionRole remote_role, | 139 cricket::ContentAction action, |
| 140 ConnectionRole local_role, |
| 141 ConnectionRole remote_role, |
| 139 int flags) { | 142 int flags) { |
| 140 Negotiate(certificate_, certificate_ ? peer->certificate_ : nullptr, action, | 143 Negotiate(certificate_, certificate_ ? peer->certificate_ : nullptr, action, |
| 141 local_role, remote_role, flags); | 144 local_role, remote_role, flags); |
| 142 } | 145 } |
| 143 | 146 |
| 144 void SetLocalTransportDescription( | 147 void SetLocalTransportDescription( |
| 145 const rtc::scoped_refptr<rtc::RTCCertificate>& cert, | 148 const rtc::scoped_refptr<rtc::RTCCertificate>& cert, |
| 146 cricket::ContentAction action, | 149 cricket::ContentAction action, |
| 147 ConnectionRole role, | 150 ConnectionRole role, |
| 148 int flags) { | 151 int flags) { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 rtc::PacketOptions packet_options; | 315 rtc::PacketOptions packet_options; |
| 313 return dtls_transports_[transport]->SendPacket( | 316 return dtls_transports_[transport]->SendPacket( |
| 314 packet.get(), size, packet_options, cricket::PF_SRTP_BYPASS); | 317 packet.get(), size, packet_options, cricket::PF_SRTP_BYPASS); |
| 315 } | 318 } |
| 316 | 319 |
| 317 void ExpectPackets(size_t transport, size_t size) { | 320 void ExpectPackets(size_t transport, size_t size) { |
| 318 packet_size_ = size; | 321 packet_size_ = size; |
| 319 received_.clear(); | 322 received_.clear(); |
| 320 } | 323 } |
| 321 | 324 |
| 322 size_t NumPacketsReceived() { | 325 size_t NumPacketsReceived() { return received_.size(); } |
| 323 return received_.size(); | |
| 324 } | |
| 325 | 326 |
| 326 bool VerifyPacket(const char* data, size_t size, uint32_t* out_num) { | 327 bool VerifyPacket(const char* data, size_t size, uint32_t* out_num) { |
| 327 if (size != packet_size_ || | 328 if (size != packet_size_ || |
| 328 (data[0] != 0 && static_cast<uint8_t>(data[0]) != 0x80)) { | 329 (data[0] != 0 && static_cast<uint8_t>(data[0]) != 0x80)) { |
| 329 return false; | 330 return false; |
| 330 } | 331 } |
| 331 uint32_t packet_num = rtc::GetBE32(data + kPacketNumOffset); | 332 uint32_t packet_num = rtc::GetBE32(data + kPacketNumOffset); |
| 332 for (size_t i = kPacketHeaderLen; i < size; ++i) { | 333 for (size_t i = kPacketHeaderLen; i < size; ++i) { |
| 333 if (static_cast<uint8_t>(data[i]) != (packet_num & 0xff)) { | 334 if (static_cast<uint8_t>(data[i]) != (packet_num & 0xff)) { |
| 334 return false; | 335 return false; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 kTimeout, fake_clock_); | 495 kTimeout, fake_clock_); |
| 495 if (!client1_.all_dtls_transports_writable() || | 496 if (!client1_.all_dtls_transports_writable() || |
| 496 !client2_.all_dtls_transports_writable()) | 497 !client2_.all_dtls_transports_writable()) |
| 497 return false; | 498 return false; |
| 498 | 499 |
| 499 // Check that we used the right roles. | 500 // Check that we used the right roles. |
| 500 if (use_dtls_) { | 501 if (use_dtls_) { |
| 501 rtc::SSLRole client1_ssl_role = | 502 rtc::SSLRole client1_ssl_role = |
| 502 (client1_role == cricket::CONNECTIONROLE_ACTIVE || | 503 (client1_role == cricket::CONNECTIONROLE_ACTIVE || |
| 503 (client2_role == cricket::CONNECTIONROLE_PASSIVE && | 504 (client2_role == cricket::CONNECTIONROLE_PASSIVE && |
| 504 client1_role == cricket::CONNECTIONROLE_ACTPASS)) ? | 505 client1_role == cricket::CONNECTIONROLE_ACTPASS)) |
| 505 rtc::SSL_CLIENT : rtc::SSL_SERVER; | 506 ? rtc::SSL_CLIENT |
| 507 : rtc::SSL_SERVER; |
| 506 | 508 |
| 507 rtc::SSLRole client2_ssl_role = | 509 rtc::SSLRole client2_ssl_role = |
| 508 (client2_role == cricket::CONNECTIONROLE_ACTIVE || | 510 (client2_role == cricket::CONNECTIONROLE_ACTIVE || |
| 509 (client1_role == cricket::CONNECTIONROLE_PASSIVE && | 511 (client1_role == cricket::CONNECTIONROLE_PASSIVE && |
| 510 client2_role == cricket::CONNECTIONROLE_ACTPASS)) ? | 512 client2_role == cricket::CONNECTIONROLE_ACTPASS)) |
| 511 rtc::SSL_CLIENT : rtc::SSL_SERVER; | 513 ? rtc::SSL_CLIENT |
| 514 : rtc::SSL_SERVER; |
| 512 | 515 |
| 513 client1_.CheckRole(client1_ssl_role); | 516 client1_.CheckRole(client1_ssl_role); |
| 514 client2_.CheckRole(client2_ssl_role); | 517 client2_.CheckRole(client2_ssl_role); |
| 515 } | 518 } |
| 516 | 519 |
| 517 if (use_dtls_) { | 520 if (use_dtls_) { |
| 518 // Check that we negotiated the right ciphers. Since GCM ciphers are not | 521 // Check that we negotiated the right ciphers. Since GCM ciphers are not |
| 519 // negotiated by default, we should end up with SRTP_AES128_CM_SHA1_32. | 522 // negotiated by default, we should end up with SRTP_AES128_CM_SHA1_32. |
| 520 client1_.CheckSrtp(rtc::SRTP_AES128_CM_SHA1_32); | 523 client1_.CheckSrtp(rtc::SRTP_AES128_CM_SHA1_32); |
| 521 client2_.CheckSrtp(rtc::SRTP_AES128_CM_SHA1_32); | 524 client2_.CheckSrtp(rtc::SRTP_AES128_CM_SHA1_32); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 539 } | 542 } |
| 540 | 543 |
| 541 void Negotiate() { | 544 void Negotiate() { |
| 542 Negotiate(cricket::CONNECTIONROLE_ACTPASS, cricket::CONNECTIONROLE_ACTIVE); | 545 Negotiate(cricket::CONNECTIONROLE_ACTPASS, cricket::CONNECTIONROLE_ACTIVE); |
| 543 } | 546 } |
| 544 | 547 |
| 545 void Negotiate(ConnectionRole client1_role, ConnectionRole client2_role) { | 548 void Negotiate(ConnectionRole client1_role, ConnectionRole client2_role) { |
| 546 client1_.SetupChannels(channel_ct_, cricket::ICEROLE_CONTROLLING); | 549 client1_.SetupChannels(channel_ct_, cricket::ICEROLE_CONTROLLING); |
| 547 client2_.SetupChannels(channel_ct_, cricket::ICEROLE_CONTROLLED); | 550 client2_.SetupChannels(channel_ct_, cricket::ICEROLE_CONTROLLED); |
| 548 // Expect success from SLTD and SRTD. | 551 // Expect success from SLTD and SRTD. |
| 549 client1_.Negotiate(&client2_, cricket::CA_OFFER, | 552 client1_.Negotiate(&client2_, cricket::CA_OFFER, client1_role, client2_role, |
| 550 client1_role, client2_role, 0); | 553 0); |
| 551 client2_.Negotiate(&client1_, cricket::CA_ANSWER, | 554 client2_.Negotiate(&client1_, cricket::CA_ANSWER, client2_role, |
| 552 client2_role, client1_role, 0); | 555 client1_role, 0); |
| 553 } | 556 } |
| 554 | 557 |
| 555 // Negotiate with legacy client |client2|. Legacy client doesn't use setup | 558 // Negotiate with legacy client |client2|. Legacy client doesn't use setup |
| 556 // attributes, except NONE. | 559 // attributes, except NONE. |
| 557 void NegotiateWithLegacy() { | 560 void NegotiateWithLegacy() { |
| 558 client1_.SetupChannels(channel_ct_, cricket::ICEROLE_CONTROLLING); | 561 client1_.SetupChannels(channel_ct_, cricket::ICEROLE_CONTROLLING); |
| 559 client2_.SetupChannels(channel_ct_, cricket::ICEROLE_CONTROLLED); | 562 client2_.SetupChannels(channel_ct_, cricket::ICEROLE_CONTROLLED); |
| 560 // Expect success from SLTD and SRTD. | 563 // Expect success from SLTD and SRTD. |
| 561 client1_.Negotiate(&client2_, cricket::CA_OFFER, | 564 client1_.Negotiate(&client2_, cricket::CA_OFFER, |
| 562 cricket::CONNECTIONROLE_ACTPASS, | 565 cricket::CONNECTIONROLE_ACTPASS, |
| 563 cricket::CONNECTIONROLE_NONE, 0); | 566 cricket::CONNECTIONROLE_NONE, 0); |
| 564 client2_.Negotiate(&client1_, cricket::CA_ANSWER, | 567 client2_.Negotiate(&client1_, cricket::CA_ANSWER, |
| 565 cricket::CONNECTIONROLE_ACTIVE, | 568 cricket::CONNECTIONROLE_ACTIVE, |
| 566 cricket::CONNECTIONROLE_NONE, 0); | 569 cricket::CONNECTIONROLE_NONE, 0); |
| 567 } | 570 } |
| 568 | 571 |
| 569 void Renegotiate(DtlsTestClient* reoffer_initiator, | 572 void Renegotiate(DtlsTestClient* reoffer_initiator, |
| 570 ConnectionRole client1_role, ConnectionRole client2_role, | 573 ConnectionRole client1_role, |
| 574 ConnectionRole client2_role, |
| 571 int flags) { | 575 int flags) { |
| 572 if (reoffer_initiator == &client1_) { | 576 if (reoffer_initiator == &client1_) { |
| 573 client1_.Negotiate(&client2_, cricket::CA_OFFER, | 577 client1_.Negotiate(&client2_, cricket::CA_OFFER, client1_role, |
| 574 client1_role, client2_role, flags); | 578 client2_role, flags); |
| 575 client2_.Negotiate(&client1_, cricket::CA_ANSWER, | 579 client2_.Negotiate(&client1_, cricket::CA_ANSWER, client2_role, |
| 576 client2_role, client1_role, flags); | 580 client1_role, flags); |
| 577 } else { | 581 } else { |
| 578 client2_.Negotiate(&client1_, cricket::CA_OFFER, | 582 client2_.Negotiate(&client1_, cricket::CA_OFFER, client2_role, |
| 579 client2_role, client1_role, flags); | 583 client1_role, flags); |
| 580 client1_.Negotiate(&client2_, cricket::CA_ANSWER, | 584 client1_.Negotiate(&client2_, cricket::CA_ANSWER, client1_role, |
| 581 client1_role, client2_role, flags); | 585 client2_role, flags); |
| 582 } | 586 } |
| 583 } | 587 } |
| 584 | 588 |
| 585 void TestTransfer(size_t transport, size_t size, size_t count, bool srtp) { | 589 void TestTransfer(size_t transport, size_t size, size_t count, bool srtp) { |
| 586 LOG(LS_INFO) << "Expect packets, size=" << size; | 590 LOG(LS_INFO) << "Expect packets, size=" << size; |
| 587 client2_.ExpectPackets(transport, size); | 591 client2_.ExpectPackets(transport, size); |
| 588 client1_.SendPackets(transport, size, count, srtp); | 592 client1_.SendPackets(transport, size, count, srtp); |
| 589 EXPECT_EQ_SIMULATED_WAIT(count, client2_.NumPacketsReceived(), kTimeout, | 593 EXPECT_EQ_SIMULATED_WAIT(count, client2_.NumPacketsReceived(), kTimeout, |
| 590 fake_clock_); | 594 fake_clock_); |
| 591 } | 595 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 EXPECT_EQ(rtc::SSL_SERVER, *client1_.transport()->GetSslRole()); | 799 EXPECT_EQ(rtc::SSL_SERVER, *client1_.transport()->GetSslRole()); |
| 796 EXPECT_EQ(rtc::SSL_CLIENT, *client2_.transport()->GetSslRole()); | 800 EXPECT_EQ(rtc::SSL_CLIENT, *client2_.transport()->GetSslRole()); |
| 797 } | 801 } |
| 798 | 802 |
| 799 // Testing re offer/answer after the session is estbalished. Roles will be | 803 // Testing re offer/answer after the session is estbalished. Roles will be |
| 800 // kept same as of the previous negotiation. | 804 // kept same as of the previous negotiation. |
| 801 TEST_F(DtlsTransportChannelTest, TestDtlsReOfferFromOfferer) { | 805 TEST_F(DtlsTransportChannelTest, TestDtlsReOfferFromOfferer) { |
| 802 SetChannelCount(2); | 806 SetChannelCount(2); |
| 803 PrepareDtls(true, true, rtc::KT_DEFAULT); | 807 PrepareDtls(true, true, rtc::KT_DEFAULT); |
| 804 // Initial role for client1 is ACTPASS and client2 is ACTIVE. | 808 // Initial role for client1 is ACTPASS and client2 is ACTIVE. |
| 805 ASSERT_TRUE(Connect(cricket::CONNECTIONROLE_ACTPASS, | 809 ASSERT_TRUE( |
| 806 cricket::CONNECTIONROLE_ACTIVE)); | 810 Connect(cricket::CONNECTIONROLE_ACTPASS, cricket::CONNECTIONROLE_ACTIVE)); |
| 807 TestTransfer(0, 1000, 100, true); | 811 TestTransfer(0, 1000, 100, true); |
| 808 TestTransfer(1, 1000, 100, true); | 812 TestTransfer(1, 1000, 100, true); |
| 809 // Using input roles for the re-offer. | 813 // Using input roles for the re-offer. |
| 810 Renegotiate(&client1_, cricket::CONNECTIONROLE_ACTPASS, | 814 Renegotiate(&client1_, cricket::CONNECTIONROLE_ACTPASS, |
| 811 cricket::CONNECTIONROLE_ACTIVE, NF_REOFFER); | 815 cricket::CONNECTIONROLE_ACTIVE, NF_REOFFER); |
| 812 TestTransfer(0, 1000, 100, true); | 816 TestTransfer(0, 1000, 100, true); |
| 813 TestTransfer(1, 1000, 100, true); | 817 TestTransfer(1, 1000, 100, true); |
| 814 } | 818 } |
| 815 | 819 |
| 816 TEST_F(DtlsTransportChannelTest, TestDtlsReOfferFromAnswerer) { | 820 TEST_F(DtlsTransportChannelTest, TestDtlsReOfferFromAnswerer) { |
| 817 SetChannelCount(2); | 821 SetChannelCount(2); |
| 818 PrepareDtls(true, true, rtc::KT_DEFAULT); | 822 PrepareDtls(true, true, rtc::KT_DEFAULT); |
| 819 // Initial role for client1 is ACTPASS and client2 is ACTIVE. | 823 // Initial role for client1 is ACTPASS and client2 is ACTIVE. |
| 820 ASSERT_TRUE(Connect(cricket::CONNECTIONROLE_ACTPASS, | 824 ASSERT_TRUE( |
| 821 cricket::CONNECTIONROLE_ACTIVE)); | 825 Connect(cricket::CONNECTIONROLE_ACTPASS, cricket::CONNECTIONROLE_ACTIVE)); |
| 822 TestTransfer(0, 1000, 100, true); | 826 TestTransfer(0, 1000, 100, true); |
| 823 TestTransfer(1, 1000, 100, true); | 827 TestTransfer(1, 1000, 100, true); |
| 824 // Using input roles for the re-offer. | 828 // Using input roles for the re-offer. |
| 825 Renegotiate(&client2_, cricket::CONNECTIONROLE_PASSIVE, | 829 Renegotiate(&client2_, cricket::CONNECTIONROLE_PASSIVE, |
| 826 cricket::CONNECTIONROLE_ACTPASS, NF_REOFFER); | 830 cricket::CONNECTIONROLE_ACTPASS, NF_REOFFER); |
| 827 TestTransfer(0, 1000, 100, true); | 831 TestTransfer(0, 1000, 100, true); |
| 828 TestTransfer(1, 1000, 100, true); | 832 TestTransfer(1, 1000, 100, true); |
| 829 } | 833 } |
| 830 | 834 |
| 831 // Test that any change in role after the intial setup will result in failure. | 835 // Test that any change in role after the intial setup will result in failure. |
| 832 TEST_F(DtlsTransportChannelTest, TestDtlsRoleReversal) { | 836 TEST_F(DtlsTransportChannelTest, TestDtlsRoleReversal) { |
| 833 SetChannelCount(2); | 837 SetChannelCount(2); |
| 834 PrepareDtls(true, true, rtc::KT_DEFAULT); | 838 PrepareDtls(true, true, rtc::KT_DEFAULT); |
| 835 ASSERT_TRUE(Connect(cricket::CONNECTIONROLE_ACTPASS, | 839 ASSERT_TRUE(Connect(cricket::CONNECTIONROLE_ACTPASS, |
| 836 cricket::CONNECTIONROLE_PASSIVE)); | 840 cricket::CONNECTIONROLE_PASSIVE)); |
| 837 | 841 |
| 838 // Renegotiate from client2 with actpass and client1 as active. | 842 // Renegotiate from client2 with actpass and client1 as active. |
| 839 Renegotiate(&client2_, cricket::CONNECTIONROLE_ACTPASS, | 843 Renegotiate(&client2_, cricket::CONNECTIONROLE_ACTPASS, |
| 840 cricket::CONNECTIONROLE_ACTIVE, | 844 cricket::CONNECTIONROLE_ACTIVE, NF_REOFFER | NF_EXPECT_FAILURE); |
| 841 NF_REOFFER | NF_EXPECT_FAILURE); | |
| 842 } | 845 } |
| 843 | 846 |
| 844 // Test that using different setup attributes which results in similar ssl | 847 // Test that using different setup attributes which results in similar ssl |
| 845 // role as the initial negotiation will result in success. | 848 // role as the initial negotiation will result in success. |
| 846 TEST_F(DtlsTransportChannelTest, TestDtlsReOfferWithDifferentSetupAttr) { | 849 TEST_F(DtlsTransportChannelTest, TestDtlsReOfferWithDifferentSetupAttr) { |
| 847 SetChannelCount(2); | 850 SetChannelCount(2); |
| 848 PrepareDtls(true, true, rtc::KT_DEFAULT); | 851 PrepareDtls(true, true, rtc::KT_DEFAULT); |
| 849 ASSERT_TRUE(Connect(cricket::CONNECTIONROLE_ACTPASS, | 852 ASSERT_TRUE(Connect(cricket::CONNECTIONROLE_ACTPASS, |
| 850 cricket::CONNECTIONROLE_PASSIVE)); | 853 cricket::CONNECTIONROLE_PASSIVE)); |
| 851 // Renegotiate from client2 with actpass and client1 as active. | 854 // Renegotiate from client2 with actpass and client1 as active. |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 std::vector<DtlsTransportEvent>{ | 1128 std::vector<DtlsTransportEvent>{ |
| 1126 CALLER_RECEIVES_CLIENTHELLO, CALLER_RECEIVES_FINGERPRINT, | 1129 CALLER_RECEIVES_CLIENTHELLO, CALLER_RECEIVES_FINGERPRINT, |
| 1127 CALLER_WRITABLE, HANDSHAKE_FINISHES}, | 1130 CALLER_WRITABLE, HANDSHAKE_FINISHES}, |
| 1128 std::vector<DtlsTransportEvent>{ | 1131 std::vector<DtlsTransportEvent>{ |
| 1129 CALLER_RECEIVES_CLIENTHELLO, CALLER_WRITABLE, | 1132 CALLER_RECEIVES_CLIENTHELLO, CALLER_WRITABLE, |
| 1130 CALLER_RECEIVES_FINGERPRINT, HANDSHAKE_FINISHES}, | 1133 CALLER_RECEIVES_FINGERPRINT, HANDSHAKE_FINISHES}, |
| 1131 std::vector<DtlsTransportEvent>{CALLER_RECEIVES_CLIENTHELLO, | 1134 std::vector<DtlsTransportEvent>{CALLER_RECEIVES_CLIENTHELLO, |
| 1132 CALLER_WRITABLE, HANDSHAKE_FINISHES, | 1135 CALLER_WRITABLE, HANDSHAKE_FINISHES, |
| 1133 CALLER_RECEIVES_FINGERPRINT}), | 1136 CALLER_RECEIVES_FINGERPRINT}), |
| 1134 ::testing::Bool())); | 1137 ::testing::Bool())); |
| OLD | NEW |