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

Side by Side Diff: webrtc/p2p/base/transportcontroller_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 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 ASSERT_TRUE(channel->SetSslRole(rtc::SSL_CLIENT)); 253 ASSERT_TRUE(channel->SetSslRole(rtc::SSL_CLIENT));
254 rtc::SSLRole role; 254 rtc::SSLRole role;
255 EXPECT_TRUE(transport_controller_->GetSslRole(&role)); 255 EXPECT_TRUE(transport_controller_->GetSslRole(&role));
256 EXPECT_EQ(rtc::SSL_CLIENT, role); 256 EXPECT_EQ(rtc::SSL_CLIENT, role);
257 } 257 }
258 258
259 TEST_F(TransportControllerTest, TestSetAndGetLocalCertificate) { 259 TEST_F(TransportControllerTest, TestSetAndGetLocalCertificate) {
260 rtc::scoped_refptr<rtc::RTCCertificate> certificate1 = 260 rtc::scoped_refptr<rtc::RTCCertificate> certificate1 =
261 rtc::RTCCertificate::Create( 261 rtc::RTCCertificate::Create(
262 rtc::scoped_ptr<rtc::SSLIdentity>( 262 rtc::scoped_ptr<rtc::SSLIdentity>(
263 rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT)) 263 rtc::SSLIdentity::Generate("session1", rtc::KeyTypeFull()))
264 .Pass()); 264 .Pass());
265 rtc::scoped_refptr<rtc::RTCCertificate> certificate2 = 265 rtc::scoped_refptr<rtc::RTCCertificate> certificate2 =
266 rtc::RTCCertificate::Create( 266 rtc::RTCCertificate::Create(
267 rtc::scoped_ptr<rtc::SSLIdentity>( 267 rtc::scoped_ptr<rtc::SSLIdentity>(
268 rtc::SSLIdentity::Generate("session2", rtc::KT_DEFAULT)) 268 rtc::SSLIdentity::Generate("session2", rtc::KeyTypeFull()))
269 .Pass()); 269 .Pass());
270 rtc::scoped_refptr<rtc::RTCCertificate> returned_certificate; 270 rtc::scoped_refptr<rtc::RTCCertificate> returned_certificate;
271 271
272 FakeTransportChannel* channel1 = CreateChannel("audio", 1); 272 FakeTransportChannel* channel1 = CreateChannel("audio", 1);
273 ASSERT_NE(nullptr, channel1); 273 ASSERT_NE(nullptr, channel1);
274 274
275 EXPECT_TRUE(transport_controller_->SetLocalCertificate(certificate1)); 275 EXPECT_TRUE(transport_controller_->SetLocalCertificate(certificate1));
276 EXPECT_TRUE(transport_controller_->GetLocalCertificate( 276 EXPECT_TRUE(transport_controller_->GetLocalCertificate(
277 "audio", &returned_certificate)); 277 "audio", &returned_certificate));
278 EXPECT_EQ(certificate1->identity()->certificate().ToPEMString(), 278 EXPECT_EQ(certificate1->identity()->certificate().ToPEMString(),
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 // new --> gathering --> complete 670 // new --> gathering --> complete
671 EXPECT_EQ_WAIT(cricket::kIceGatheringComplete, gathering_state_, kTimeout); 671 EXPECT_EQ_WAIT(cricket::kIceGatheringComplete, gathering_state_, kTimeout);
672 EXPECT_EQ(2, gathering_state_signal_count_); 672 EXPECT_EQ(2, gathering_state_signal_count_);
673 673
674 EXPECT_EQ_WAIT(1U, candidates_["audio"].size(), kTimeout); 674 EXPECT_EQ_WAIT(1U, candidates_["audio"].size(), kTimeout);
675 EXPECT_EQ_WAIT(1U, candidates_["video"].size(), kTimeout); 675 EXPECT_EQ_WAIT(1U, candidates_["video"].size(), kTimeout);
676 EXPECT_EQ(2, candidates_signal_count_); 676 EXPECT_EQ(2, candidates_signal_count_);
677 677
678 EXPECT_TRUE(!signaled_on_non_signaling_thread_); 678 EXPECT_TRUE(!signaled_on_non_signaling_thread_);
679 } 679 }
OLDNEW
« webrtc/base/sslstreamadapter.cc ('K') | « webrtc/p2p/base/dtlstransportchannel_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698