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

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

Issue 1189583002: Support generation of EC keys using P256 curve and support ECDSA certs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: generalize ssl testing code, misc fixes Created 5 years, 5 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 flags2 = (flags2 & ~SECURE); 189 flags2 = (flags2 & ~SECURE);
190 } 190 }
191 CreateContent(flags1, kPcmuCodec, kH264Codec, 191 CreateContent(flags1, kPcmuCodec, kH264Codec,
192 &local_media_content1_); 192 &local_media_content1_);
193 CreateContent(flags2, kPcmuCodec, kH264Codec, 193 CreateContent(flags2, kPcmuCodec, kH264Codec,
194 &local_media_content2_); 194 &local_media_content2_);
195 CopyContent(local_media_content1_, &remote_media_content1_); 195 CopyContent(local_media_content1_, &remote_media_content1_);
196 CopyContent(local_media_content2_, &remote_media_content2_); 196 CopyContent(local_media_content2_, &remote_media_content2_);
197 197
198 if (flags1 & DTLS) { 198 if (flags1 & DTLS) {
199 identity1_.reset(rtc::SSLIdentity::Generate("session1")); 199 // Confirmed to work with KT_RSA and KT_ECDSA.
200 identity1_.reset(rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT));
200 session1_.set_ssl_identity(identity1_.get()); 201 session1_.set_ssl_identity(identity1_.get());
201 } 202 }
202 if (flags2 & DTLS) { 203 if (flags2 & DTLS) {
203 identity2_.reset(rtc::SSLIdentity::Generate("session2")); 204 // Confirmed to work with KT_RSA and KT_ECDSA.
205 identity2_.reset(rtc::SSLIdentity::Generate("session2", rtc::KT_DEFAULT));
204 session2_.set_ssl_identity(identity2_.get()); 206 session2_.set_ssl_identity(identity2_.get());
205 } 207 }
206 208
207 // Add stream information (SSRC) to the local content but not to the remote 209 // Add stream information (SSRC) to the local content but not to the remote
208 // content. This means that we per default know the SSRC of what we send but 210 // content. This means that we per default know the SSRC of what we send but
209 // not what we receive. 211 // not what we receive.
210 AddLegacyStreamInContent(kSsrc1, flags1, &local_media_content1_); 212 AddLegacyStreamInContent(kSsrc1, flags1, &local_media_content1_);
211 AddLegacyStreamInContent(kSsrc2, flags2, &local_media_content2_); 213 AddLegacyStreamInContent(kSsrc2, flags2, &local_media_content2_);
212 214
213 // If SSRC_MUX is used we also need to know the SSRC of the incoming stream. 215 // If SSRC_MUX is used we also need to know the SSRC of the incoming stream.
(...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after
3000 }; 3002 };
3001 rtc::Buffer payload(data, 3); 3003 rtc::Buffer payload(data, 3);
3002 cricket::SendDataResult result; 3004 cricket::SendDataResult result;
3003 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); 3005 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result));
3004 EXPECT_EQ(params.ssrc, 3006 EXPECT_EQ(params.ssrc,
3005 media_channel1_->last_sent_data_params().ssrc); 3007 media_channel1_->last_sent_data_params().ssrc);
3006 EXPECT_EQ("foo", media_channel1_->last_sent_data()); 3008 EXPECT_EQ("foo", media_channel1_->last_sent_data());
3007 } 3009 }
3008 3010
3009 // TODO(pthatcher): TestSetReceiver? 3011 // TODO(pthatcher): TestSetReceiver?
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698