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>( | 599 rtc::scoped_ptr<rtc::SSLIdentity>(rtc::SSLIdentity::Generate( |
600 rtc::SSLIdentity::Generate(identity_name, rtc::KT_DEFAULT)) | 600 identity_name, rtc::KT_DEFAULT)).Pass())); |
601 .Pass())); | |
602 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); | 601 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); |
603 } | 602 } |
604 | 603 |
605 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, | 604 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, |
606 bool expected) { | 605 bool expected) { |
607 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); | 606 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); |
608 ASSERT_TRUE(audio != NULL); | 607 ASSERT_TRUE(audio != NULL); |
609 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); | 608 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); |
610 const TransportInfo* video = sdp->GetTransportInfoByName("video"); | 609 const TransportInfo* video = sdp->GetTransportInfoByName("video"); |
611 ASSERT_TRUE(video != NULL); | 610 ASSERT_TRUE(video != NULL); |
(...skipping 3422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4034 } | 4033 } |
4035 | 4034 |
4036 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4035 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4037 // currently fails because upon disconnection and reconnection OnIceComplete is | 4036 // currently fails because upon disconnection and reconnection OnIceComplete is |
4038 // called more than once without returning to IceGatheringGathering. | 4037 // called more than once without returning to IceGatheringGathering. |
4039 | 4038 |
4040 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4039 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4041 WebRtcSessionTest, | 4040 WebRtcSessionTest, |
4042 testing::Values(ALREADY_GENERATED, | 4041 testing::Values(ALREADY_GENERATED, |
4043 DTLS_IDENTITY_STORE)); | 4042 DTLS_IDENTITY_STORE)); |
OLD | NEW |