diff options
-rw-r--r-- | content/content_renderer.gypi | 1 | ||||
-rw-r--r-- | content/renderer/media/media_stream_dependency_factory.cc | 9 | ||||
-rw-r--r-- | net/socket/nss_ssl_util.h | 4 | ||||
-rw-r--r-- | third_party/libjingle/libjingle.gyp | 19 |
4 files changed, 32 insertions, 1 deletions
diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index d401583..2a96e10 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -329,6 +329,7 @@ '../third_party/webrtc/modules/modules.gyp:audio_device', '../third_party/webrtc/video_engine/video_engine.gyp:video_engine_core', '../third_party/webrtc/voice_engine/voice_engine.gyp:voice_engine_core', + '<(DEPTH)/crypto/crypto.gyp:crypto', ], 'sources': [ 'renderer/media/media_stream_center.cc', diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc index 19c7691..15229d2 100644 --- a/content/renderer/media/media_stream_dependency_factory.cc +++ b/content/renderer/media/media_stream_dependency_factory.cc @@ -24,6 +24,10 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamDescriptor.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamSource.h" +#if !defined(USE_OPENSSL) +#include "net/socket/nss_ssl_util.h" +#endif + class P2PPortAllocatorFactory : public webrtc::PortAllocatorFactoryInterface { public: P2PPortAllocatorFactory( @@ -352,6 +356,11 @@ bool MediaStreamDependencyFactory::EnsurePeerConnectionFactory() { new content::IpcPacketSocketFactory(p2p_socket_dispatcher_)); } +#if !defined(USE_OPENSSL) + // Init NSS, which will be needed by PeerConnection. + net::EnsureNSSSSLInit(); +#endif + if (!CreatePeerConnectionFactory()) { LOG(ERROR) << "Could not create PeerConnection factory"; return false; diff --git a/net/socket/nss_ssl_util.h b/net/socket/nss_ssl_util.h index 6c95661..09ae356 100644 --- a/net/socket/nss_ssl_util.h +++ b/net/socket/nss_ssl_util.h @@ -10,12 +10,14 @@ #include <prerror.h> +#include "net/base/net_export.h" + namespace net { class BoundNetLog; // Initalize NSS SSL library. -void EnsureNSSSSLInit(); +NET_EXPORT void EnsureNSSSSLInit(); // Log a failed NSS funcion call. void LogFailedNSSFunction(const BoundNetLog& net_log, diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp index c4d3e07..faca2c3 100644 --- a/third_party/libjingle/libjingle.gyp +++ b/third_party/libjingle/libjingle.gyp @@ -134,6 +134,25 @@ }, }, 'conditions': [ + ['use_openssl!=1', { + 'defines': [ + 'SSL_USE_NSS', + ], + 'conditions': [ + ['os_posix == 1 and OS != "mac" and OS != "ios" and ' + 'OS != "android"', { + 'dependencies': [ + '<(DEPTH)/build/linux/system.gyp:ssl', + ], + }], + ['OS == "mac" or OS == "ios" or OS == "win"', { + 'dependencies': [ + '<(DEPTH)/third_party/nss/nss.gyp:nspr', + '<(DEPTH)/third_party/nss/nss.gyp:nss', + ], + }], + ], + }], ['OS=="win"', { 'include_dirs': [ '../third_party/platformsdk_win7/files/Include', |