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

Unified Diff: talk/app/webrtc/peerconnectionfactory.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 side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/peerconnectionfactory.cc
diff --git a/talk/app/webrtc/peerconnectionfactory.cc b/talk/app/webrtc/peerconnectionfactory.cc
index 3524af7932a4f92f60da84e552f742d1a2aaa7ac..3eb3facb741cd707ba84840fdfe19d274e195ae0 100644
--- a/talk/app/webrtc/peerconnectionfactory.cc
+++ b/talk/app/webrtc/peerconnectionfactory.cc
@@ -28,7 +28,6 @@
#include "talk/app/webrtc/peerconnectionfactory.h"
#include "talk/app/webrtc/audiotrack.h"
-#include "talk/app/webrtc/dtlsidentityservice.h"
#include "talk/app/webrtc/dtlsidentitystore.h"
#include "talk/app/webrtc/localaudiosource.h"
#include "talk/app/webrtc/mediastreamproxy.h"
@@ -170,7 +169,7 @@ bool PeerConnectionFactory::Initialize() {
}
dtls_identity_store_.reset(
- new DtlsIdentityStore(signaling_thread_, worker_thread_));
+ new DtlsIdentityStoreImpl(signaling_thread_, worker_thread_));
dtls_identity_store_->Initialize();
return true;
@@ -205,14 +204,19 @@ PeerConnectionFactory::CreatePeerConnection(
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
PortAllocatorFactoryInterface* allocator_factory,
- DTLSIdentityServiceInterface* dtls_identity_service,
- PeerConnectionObserver* observer) {
+ PeerConnectionObserver* observer,
+ DtlsIdentityStoreInterface* dtls_identity_store,
+ rtc::KeyType key_type) {
DCHECK(signaling_thread_->IsCurrent());
DCHECK(allocator_factory || default_allocator_factory_);
- if (!dtls_identity_service) {
- dtls_identity_service = new DtlsIdentityService(dtls_identity_store_.get());
+ // TODO(hbos): Clarify that the API does "use parameter store, or if null use
+ // a default DtlsIdentityStoreImpl". Or nuke parameter? (Probably needed in
+ // unittest.) Or put it in the end and default it to null.
+ if (!dtls_identity_store) {
+ dtls_identity_store = dtls_identity_store_.get();
}
+ DCHECK(dtls_identity_store);
PortAllocatorFactoryInterface* chosen_allocator_factory =
allocator_factory ? allocator_factory : default_allocator_factory_.get();
@@ -224,8 +228,9 @@ PeerConnectionFactory::CreatePeerConnection(
configuration,
constraints,
chosen_allocator_factory,
- dtls_identity_service,
- observer)) {
+ observer,
+ dtls_identity_store,
+ key_type)) {
return NULL;
}
return PeerConnectionProxy::Create(signaling_thread(), pc);

Powered by Google App Engine
This is Rietveld 408576698