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

Side by Side Diff: talk/session/media/channel_unittest.cc

Issue 1329493005: Provide RSA2048 as per RFC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Allow full parameterization of RSA, curve id for ECDSA. Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2009 Google Inc. 3 * Copyright 2009 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 &local_media_content1_); 173 &local_media_content1_);
174 CreateContent(flags2, kPcmuCodec, kH264Codec, 174 CreateContent(flags2, kPcmuCodec, kH264Codec,
175 &local_media_content2_); 175 &local_media_content2_);
176 CopyContent(local_media_content1_, &remote_media_content1_); 176 CopyContent(local_media_content1_, &remote_media_content1_);
177 CopyContent(local_media_content2_, &remote_media_content2_); 177 CopyContent(local_media_content2_, &remote_media_content2_);
178 178
179 if (flags1 & DTLS) { 179 if (flags1 & DTLS) {
180 // Confirmed to work with KT_RSA and KT_ECDSA. 180 // Confirmed to work with KT_RSA and KT_ECDSA.
181 transport_controller1_.SetLocalCertificate(rtc::RTCCertificate::Create( 181 transport_controller1_.SetLocalCertificate(rtc::RTCCertificate::Create(
182 rtc::scoped_ptr<rtc::SSLIdentity>( 182 rtc::scoped_ptr<rtc::SSLIdentity>(
183 rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT)) 183 rtc::SSLIdentity::Generate("session1", rtc::KeyTypeFull()))
184 .Pass())); 184 .Pass()));
185 } 185 }
186 if (flags2 & DTLS) { 186 if (flags2 & DTLS) {
187 // Confirmed to work with KT_RSA and KT_ECDSA. 187 // Confirmed to work with KT_RSA and KT_ECDSA.
188 transport_controller2_.SetLocalCertificate(rtc::RTCCertificate::Create( 188 transport_controller2_.SetLocalCertificate(rtc::RTCCertificate::Create(
189 rtc::scoped_ptr<rtc::SSLIdentity>( 189 rtc::scoped_ptr<rtc::SSLIdentity>(
190 rtc::SSLIdentity::Generate("session2", rtc::KT_DEFAULT)) 190 rtc::SSLIdentity::Generate("session2", rtc::KeyTypeFull()))
191 .Pass())); 191 .Pass()));
192 } 192 }
193 193
194 // Add stream information (SSRC) to the local content but not to the remote 194 // Add stream information (SSRC) to the local content but not to the remote
195 // content. This means that we per default know the SSRC of what we send but 195 // content. This means that we per default know the SSRC of what we send but
196 // not what we receive. 196 // not what we receive.
197 AddLegacyStreamInContent(kSsrc1, flags1, &local_media_content1_); 197 AddLegacyStreamInContent(kSsrc1, flags1, &local_media_content1_);
198 AddLegacyStreamInContent(kSsrc2, flags2, &local_media_content2_); 198 AddLegacyStreamInContent(kSsrc2, flags2, &local_media_content2_);
199 199
200 // If SSRC_MUX is used we also need to know the SSRC of the incoming stream. 200 // If SSRC_MUX is used we also need to know the SSRC of the incoming stream.
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 }; 2749 };
2750 rtc::Buffer payload(data, 3); 2750 rtc::Buffer payload(data, 3);
2751 cricket::SendDataResult result; 2751 cricket::SendDataResult result;
2752 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); 2752 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result));
2753 EXPECT_EQ(params.ssrc, 2753 EXPECT_EQ(params.ssrc,
2754 media_channel1_->last_sent_data_params().ssrc); 2754 media_channel1_->last_sent_data_params().ssrc);
2755 EXPECT_EQ("foo", media_channel1_->last_sent_data()); 2755 EXPECT_EQ("foo", media_channel1_->last_sent_data());
2756 } 2756 }
2757 2757
2758 // TODO(pthatcher): TestSetReceiver? 2758 // TODO(pthatcher): TestSetReceiver?
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698