| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 } | 589 } |
| 590 } | 590 } |
| 591 | 591 |
| 592 // Set the internal fake description factories to do DTLS-SRTP. | 592 // Set the internal fake description factories to do DTLS-SRTP. |
| 593 void SetFactoryDtlsSrtp() { | 593 void SetFactoryDtlsSrtp() { |
| 594 desc_factory_->set_secure(cricket::SEC_DISABLED); | 594 desc_factory_->set_secure(cricket::SEC_DISABLED); |
| 595 std::string identity_name = "WebRTC" + | 595 std::string identity_name = "WebRTC" + |
| 596 rtc::ToString(rtc::CreateRandomId()); | 596 rtc::ToString(rtc::CreateRandomId()); |
| 597 // Confirmed to work with KT_RSA and KT_ECDSA. | 597 // Confirmed to work with KT_RSA and KT_ECDSA. |
| 598 tdesc_factory_->set_certificate(rtc::RTCCertificate::Create( | 598 tdesc_factory_->set_certificate(rtc::RTCCertificate::Create( |
| 599 rtc::scoped_ptr<rtc::SSLIdentity>(rtc::SSLIdentity::Generate( | 599 rtc::scoped_ptr<rtc::SSLIdentity>( |
| 600 identity_name, rtc::KT_DEFAULT)).Pass())); | 600 rtc::SSLIdentity::Generate(identity_name, rtc::KT_DEFAULT)) |
| 601 .Pass())); |
| 601 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); | 602 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); |
| 602 } | 603 } |
| 603 | 604 |
| 604 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, | 605 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, |
| 605 bool expected) { | 606 bool expected) { |
| 606 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); | 607 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); |
| 607 ASSERT_TRUE(audio != NULL); | 608 ASSERT_TRUE(audio != NULL); |
| 608 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); | 609 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); |
| 609 const TransportInfo* video = sdp->GetTransportInfoByName("video"); | 610 const TransportInfo* video = sdp->GetTransportInfoByName("video"); |
| 610 ASSERT_TRUE(video != NULL); | 611 ASSERT_TRUE(video != NULL); |
| (...skipping 3422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4033 } | 4034 } |
| 4034 | 4035 |
| 4035 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4036 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
| 4036 // currently fails because upon disconnection and reconnection OnIceComplete is | 4037 // currently fails because upon disconnection and reconnection OnIceComplete is |
| 4037 // called more than once without returning to IceGatheringGathering. | 4038 // called more than once without returning to IceGatheringGathering. |
| 4038 | 4039 |
| 4039 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4040 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
| 4040 WebRtcSessionTest, | 4041 WebRtcSessionTest, |
| 4041 testing::Values(ALREADY_GENERATED, | 4042 testing::Values(ALREADY_GENERATED, |
| 4042 DTLS_IDENTITY_STORE)); | 4043 DTLS_IDENTITY_STORE)); |
| OLD | NEW |