summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorronghuawu@chromium.org <ronghuawu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-16 02:53:52 +0000
committerronghuawu@chromium.org <ronghuawu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-16 02:53:52 +0000
commit5a79ff54b614d49558933b4e8675fea6ac296b7b (patch)
tree4da749fb4766aaf6e262d58299974464574dfa29
parentd30997e5b56bc14dd8494e5239705cb0e4f27130 (diff)
downloadchromium_src-5a79ff54b614d49558933b4e8675fea6ac296b7b.zip
chromium_src-5a79ff54b614d49558933b4e8675fea6ac296b7b.tar.gz
chromium_src-5a79ff54b614d49558933b4e8675fea6ac296b7b.tar.bz2
Enable peerconnection to use the NSS RNG.
TEST=manually with apprtc.appspot.com BUG=http://code.google.com/p/webrtc/issues/detail?id=591 Review URL: https://chromiumcodereview.appspot.com/11093061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162055 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/content_renderer.gypi1
-rw-r--r--content/renderer/media/media_stream_dependency_factory.cc9
-rw-r--r--net/socket/nss_ssl_util.h4
-rw-r--r--third_party/libjingle/libjingle.gyp19
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',