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

Side by Side Diff: talk/app/webrtc/webrtcsession_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: explicitly enable ECDSA for NSS; tolerate ECDSA and RSA certs in unittest 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 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 EXPECT_EQ(std::string(cricket::kMediaProtocolAvpf), 555 EXPECT_EQ(std::string(cricket::kMediaProtocolAvpf),
556 video_content->protocol()); 556 video_content->protocol());
557 } 557 }
558 } 558 }
559 559
560 // Set the internal fake description factories to do DTLS-SRTP. 560 // Set the internal fake description factories to do DTLS-SRTP.
561 void SetFactoryDtlsSrtp() { 561 void SetFactoryDtlsSrtp() {
562 desc_factory_->set_secure(cricket::SEC_DISABLED); 562 desc_factory_->set_secure(cricket::SEC_DISABLED);
563 std::string identity_name = "WebRTC" + 563 std::string identity_name = "WebRTC" +
564 rtc::ToString(rtc::CreateRandomId()); 564 rtc::ToString(rtc::CreateRandomId());
565 identity_.reset(rtc::SSLIdentity::Generate(identity_name)); 565 // Confirmed to work with KT_RSA and KT_ECDSA.
566 identity_.reset(rtc::SSLIdentity::Generate(identity_name, rtc::KT_DEFAULT));
566 tdesc_factory_->set_identity(identity_.get()); 567 tdesc_factory_->set_identity(identity_.get());
567 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); 568 tdesc_factory_->set_secure(cricket::SEC_REQUIRED);
568 } 569 }
569 570
570 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, 571 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp,
571 bool expected) { 572 bool expected) {
572 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); 573 const TransportInfo* audio = sdp->GetTransportInfoByName("audio");
573 ASSERT_TRUE(audio != NULL); 574 ASSERT_TRUE(audio != NULL);
574 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); 575 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL);
575 const TransportInfo* video = sdp->GetTransportInfoByName("video"); 576 const TransportInfo* video = sdp->GetTransportInfoByName("video");
(...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after
3874 EXPECT_EQ(4000, option_val); 3875 EXPECT_EQ(4000, option_val);
3875 3876
3876 EXPECT_TRUE(session_->voice_channel()->transport_channel()->GetOption( 3877 EXPECT_TRUE(session_->voice_channel()->transport_channel()->GetOption(
3877 rtc::Socket::Option::OPT_RCVBUF, &option_val)); 3878 rtc::Socket::Option::OPT_RCVBUF, &option_val));
3878 EXPECT_EQ(8000, option_val); 3879 EXPECT_EQ(8000, option_val);
3879 } 3880 }
3880 3881
3881 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 3882 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
3882 // currently fails because upon disconnection and reconnection OnIceComplete is 3883 // currently fails because upon disconnection and reconnection OnIceComplete is
3883 // called more than once without returning to IceGatheringGathering. 3884 // called more than once without returning to IceGatheringGathering.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698