Commit f0443354 authored by davidben's avatar davidben Committed by Commit bot

EnsureOpenSSLInit before calling into WebRTC.

BoringSSL may currently only be initialized by one piece of code, so full
initialization must happen in Chromium code, rather than WebRTC.

Historically, this was because the locking callbacks needed to be configured.
This is gone, but EnsureOpenSSLInit still configures NEON support on Android
and detects a CPU with known broken NEON support. Until that's moved to inside
the library (https://crbug.com/542879), Chromium must initialize some of the
stack ourselves.

BUG=556462

Review URL: https://codereview.chromium.org/1462443003

Cr-Commit-Position: refs/heads/master@{#360466}
parent ae1d10fe
......@@ -46,6 +46,7 @@
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
#include "crypto/openssl_util.h"
#include "jingle/glue/thread_wrapper.h"
#include "media/base/media_permission.h"
#include "media/renderers/gpu_video_accelerator_factories.h"
......@@ -360,6 +361,12 @@ void PeerConnectionDependencyFactory::CreatePeerConnectionFactory() {
CHECK(worker_thread_);
// Init SSL, which will be needed by PeerConnection.
//
// TODO(davidben): BoringSSL must be initialized by Chromium code. If the
// initialization requirement is removed or when different libraries are
// allowed to call CRYPTO_library_init concurrently, remove this line and
// initialize within WebRTC. See https://crbug.com/542879.
crypto::EnsureOpenSSLInit();
if (!rtc::InitializeSSL()) {
LOG(ERROR) << "Failed on InitializeSSL.";
NOTREACHED();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment