0

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
This commit is contained in:
ronghuawu@chromium.org
2012-10-16 02:53:52 +00:00
parent d30997e5b5
commit 5a79ff54b6
4 changed files with 32 additions and 1 deletions

@ -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',

@ -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;

@ -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,

@ -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',