Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1093)

Unified Diff: talk/session/media/channel_unittest.cc

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Merge with master Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/session/media/channel_unittest.cc
diff --git a/talk/session/media/channel_unittest.cc b/talk/session/media/channel_unittest.cc
index a79302865e30897affb598b71b5c964f2ac5d458..fb4bb0dcb54f6056f407bc19b7f507191faa3b67 100644
--- a/talk/session/media/channel_unittest.cc
+++ b/talk/session/media/channel_unittest.cc
@@ -195,14 +195,20 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
CopyContent(local_media_content2_, &remote_media_content2_);
if (flags1 & DTLS) {
- // Confirmed to work with KT_RSA and KT_ECDSA.
- identity1_.reset(rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT));
- session1_.set_ssl_identity(identity1_.get());
+ rtc::scoped_refptr<webrtc::DtlsCertificate> certificate =
+ webrtc::DtlsCertificate::Create(
+ rtc::scoped_ptr<rtc::SSLIdentity>(
+ rtc::SSLIdentity::Generate("session1",
+ rtc::KT_DEFAULT)).Pass());
+ session1_.set_ssl_certificate(certificate);
}
if (flags2 & DTLS) {
- // Confirmed to work with KT_RSA and KT_ECDSA.
- identity2_.reset(rtc::SSLIdentity::Generate("session2", rtc::KT_DEFAULT));
- session2_.set_ssl_identity(identity2_.get());
+ rtc::scoped_refptr<webrtc::DtlsCertificate> certificate =
+ webrtc::DtlsCertificate::Create(
+ rtc::scoped_ptr<rtc::SSLIdentity>(
+ rtc::SSLIdentity::Generate("session2",
+ rtc::KT_DEFAULT)).Pass());
+ session2_.set_ssl_certificate(certificate);
}
// Add stream information (SSRC) to the local content but not to the remote
@@ -1791,8 +1797,6 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
typename T::Content local_media_content2_;
typename T::Content remote_media_content1_;
typename T::Content remote_media_content2_;
- rtc::scoped_ptr<rtc::SSLIdentity> identity1_;
- rtc::scoped_ptr<rtc::SSLIdentity> identity2_;
// The RTP and RTCP packets to send in the tests.
std::string rtp_packet_;
std::string rtcp_packet_;

Powered by Google App Engine
This is Rietveld 408576698