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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 EXPECT_EQ(std::string(cricket::kMediaProtocolAvpf), | 533 EXPECT_EQ(std::string(cricket::kMediaProtocolAvpf), |
534 video_content->protocol()); | 534 video_content->protocol()); |
535 } | 535 } |
536 } | 536 } |
537 | 537 |
538 // Set the internal fake description factories to do DTLS-SRTP. | 538 // Set the internal fake description factories to do DTLS-SRTP. |
539 void SetFactoryDtlsSrtp() { | 539 void SetFactoryDtlsSrtp() { |
540 desc_factory_->set_secure(cricket::SEC_DISABLED); | 540 desc_factory_->set_secure(cricket::SEC_DISABLED); |
541 std::string identity_name = "WebRTC" + | 541 std::string identity_name = "WebRTC" + |
542 rtc::ToString(rtc::CreateRandomId()); | 542 rtc::ToString(rtc::CreateRandomId()); |
543 identity_.reset(rtc::SSLIdentity::Generate(identity_name)); | 543 // Confirmed to work with KT_RSA and KT_ECDSA. |
| 544 identity_.reset(rtc::SSLIdentity::Generate(identity_name, rtc::KT_DEFAULT)); |
544 tdesc_factory_->set_identity(identity_.get()); | 545 tdesc_factory_->set_identity(identity_.get()); |
545 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); | 546 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); |
546 } | 547 } |
547 | 548 |
548 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, | 549 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, |
549 bool expected) { | 550 bool expected) { |
550 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); | 551 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); |
551 ASSERT_TRUE(audio != NULL); | 552 ASSERT_TRUE(audio != NULL); |
552 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); | 553 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); |
553 const TransportInfo* video = sdp->GetTransportInfoByName("video"); | 554 const TransportInfo* video = sdp->GetTransportInfoByName("video"); |
(...skipping 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3943 // terminated. The offer creation may or may not have succeeded, but we | 3944 // terminated. The offer creation may or may not have succeeded, but we |
3944 // must have received a notification which, so the only invalid state | 3945 // must have received a notification which, so the only invalid state |
3945 // is kInit. | 3946 // is kInit. |
3946 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state()); | 3947 EXPECT_NE(WebRtcSessionCreateSDPObserverForTest::kInit, o->state()); |
3947 } | 3948 } |
3948 } | 3949 } |
3949 | 3950 |
3950 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 3951 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
3951 // currently fails because upon disconnection and reconnection OnIceComplete is | 3952 // currently fails because upon disconnection and reconnection OnIceComplete is |
3952 // called more than once without returning to IceGatheringGathering. | 3953 // called more than once without returning to IceGatheringGathering. |
OLD | NEW |