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

Side by Side Diff: talk/app/webrtc/peerconnection.cc

Issue 1151943005: Ability to specify KeyType (RSA, ECDSA) for SSLIdentity generation in libjingle (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing ASAN, LSAN issues in unittests Created 5 years, 6 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 if (mediastream_signaling_) 341 if (mediastream_signaling_)
342 mediastream_signaling_->TearDown(); 342 mediastream_signaling_->TearDown();
343 if (stream_handler_container_) 343 if (stream_handler_container_)
344 stream_handler_container_->TearDown(); 344 stream_handler_container_->TearDown();
345 } 345 }
346 346
347 bool PeerConnection::Initialize( 347 bool PeerConnection::Initialize(
348 const PeerConnectionInterface::RTCConfiguration& configuration, 348 const PeerConnectionInterface::RTCConfiguration& configuration,
349 const MediaConstraintsInterface* constraints, 349 const MediaConstraintsInterface* constraints,
350 PortAllocatorFactoryInterface* allocator_factory, 350 PortAllocatorFactoryInterface* allocator_factory,
351 DTLSIdentityServiceInterface* dtls_identity_service, 351 PeerConnectionObserver* observer,
352 PeerConnectionObserver* observer) { 352 DtlsIdentityStoreInterface* dtls_identity_store,
353 ASSERT(observer != NULL); 353 rtc::KeyType key_type) {
354 ASSERT(observer);
354 if (!observer) 355 if (!observer)
355 return false; 356 return false;
356 observer_ = observer; 357 observer_ = observer;
357 358
358 std::vector<PortAllocatorFactoryInterface::StunConfiguration> stun_config; 359 std::vector<PortAllocatorFactoryInterface::StunConfiguration> stun_config;
359 std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turn_config; 360 std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turn_config;
360 if (!ParseIceServers(configuration.servers, &stun_config, &turn_config)) { 361 if (!ParseIceServers(configuration.servers, &stun_config, &turn_config)) {
361 return false; 362 return false;
362 } 363 }
363 port_allocator_.reset( 364 port_allocator_.reset(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 factory_->signaling_thread(), 398 factory_->signaling_thread(),
398 factory_->worker_thread(), 399 factory_->worker_thread(),
399 port_allocator_.get(), 400 port_allocator_.get(),
400 mediastream_signaling_.get())); 401 mediastream_signaling_.get()));
401 stream_handler_container_.reset(new MediaStreamHandlerContainer( 402 stream_handler_container_.reset(new MediaStreamHandlerContainer(
402 session_.get(), session_.get())); 403 session_.get(), session_.get()));
403 stats_.reset(new StatsCollector(session_.get())); 404 stats_.reset(new StatsCollector(session_.get()));
404 405
405 // Initialize the WebRtcSession. It creates transport channels etc. 406 // Initialize the WebRtcSession. It creates transport channels etc.
406 if (!session_->Initialize(factory_->options(), constraints, 407 if (!session_->Initialize(factory_->options(), constraints,
407 dtls_identity_service, configuration)) 408 configuration, dtls_identity_store, key_type))
408 return false; 409 return false;
409 410
410 // Register PeerConnection as receiver of local ice candidates. 411 // Register PeerConnection as receiver of local ice candidates.
411 // All the callbacks will be posted to the application from PeerConnection. 412 // All the callbacks will be posted to the application from PeerConnection.
412 session_->RegisterIceObserver(this); 413 session_->RegisterIceObserver(this);
413 session_->SignalState.connect(this, &PeerConnection::OnSessionStateChange); 414 session_->SignalState.connect(this, &PeerConnection::OnSessionStateChange);
414 return true; 415 return true;
415 } 416 }
416 417
417 rtc::scoped_refptr<StreamCollectionInterface> 418 rtc::scoped_refptr<StreamCollectionInterface>
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 if (ice_gathering_state_ != kIceGatheringComplete) { 896 if (ice_gathering_state_ != kIceGatheringComplete) {
896 ice_gathering_state_ = kIceGatheringComplete; 897 ice_gathering_state_ = kIceGatheringComplete;
897 observer_->OnIceGatheringChange(ice_gathering_state_); 898 observer_->OnIceGatheringChange(ice_gathering_state_);
898 } 899 }
899 } 900 }
900 observer_->OnSignalingChange(signaling_state_); 901 observer_->OnSignalingChange(signaling_state_);
901 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); 902 observer_->OnStateChange(PeerConnectionObserver::kSignalingState);
902 } 903 }
903 904
904 } // namespace webrtc 905 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698