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

Unified Diff: crypto/openssl_util.cc

Issue 401153002: Switch to BoringSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase across DEPS change Created 6 years, 5 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
« no previous file with comments | « crypto/openssl_bio_string_unittest.cc ('k') | crypto/rsa_private_key_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/openssl_util.cc
diff --git a/crypto/openssl_util.cc b/crypto/openssl_util.cc
index 34af810c1d01c5f4e4976464ba0c349763434164..94bf246a7cdbe3d8d02bfdae2acc70c6272d32a0 100644
--- a/crypto/openssl_util.cc
+++ b/crypto/openssl_util.cc
@@ -6,6 +6,7 @@
#include <openssl/err.h>
#include <openssl/ssl.h>
+#include <openssl/cpu.h>
#include "base/logging.h"
#include "base/memory/scoped_vector.h"
@@ -22,8 +23,9 @@ namespace crypto {
namespace {
-unsigned long CurrentThreadId() {
- return static_cast<unsigned long>(base::PlatformThread::CurrentId());
+void CurrentThreadId(CRYPTO_THREADID* id) {
+ CRYPTO_THREADID_set_numeric(
+ id, static_cast<unsigned long>(base::PlatformThread::CurrentId()));
}
// Singleton for initializing and cleaning up the OpenSSL library.
@@ -53,7 +55,7 @@ class OpenSSLInitSingleton {
for (int i = 0; i < num_locks; ++i)
locks_.push_back(new base::Lock());
CRYPTO_set_locking_callback(LockingCallback);
- CRYPTO_set_id_callback(CurrentThreadId);
+ CRYPTO_THREADID_set_callback(CurrentThreadId);
#if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL)
const bool has_neon =
« no previous file with comments | « crypto/openssl_bio_string_unittest.cc ('k') | crypto/rsa_private_key_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698