From 27e4c3bab2540f08a7f60f885a4bf5d4db405990 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 12 Apr 2018 18:31:36 -0400 Subject: [PATCH] Add an OPENSSL_malloc_init stub. OpenSSL 1.1.0 renamed that. Also clang-format wanted to smush it all onto one line. Change-Id: Icdaa0eefc503c4aab1b309ccb34625f5e811c537 Reviewed-on: https://boringssl-review.googlesource.com/27404 Commit-Queue: Steven Valdez Reviewed-by: Steven Valdez CQ-Verified: CQ bot account: commit-bot@chromium.org --- crypto/crypto.c | 26 ++++++++------------------ include/openssl/crypto.h | 3 +++ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/crypto/crypto.c b/crypto/crypto.c index 9f4639f2..57527122 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -164,31 +164,21 @@ int CRYPTO_has_asm(void) { #endif } -const char *SSLeay_version(int unused) { - return "BoringSSL"; -} +const char *SSLeay_version(int unused) { return "BoringSSL"; } -const char *OpenSSL_version(int unused) { - return "BoringSSL"; -} +const char *OpenSSL_version(int unused) { return "BoringSSL"; } -unsigned long SSLeay(void) { - return OPENSSL_VERSION_NUMBER; -} +unsigned long SSLeay(void) { return OPENSSL_VERSION_NUMBER; } -unsigned long OpenSSL_version_num(void) { - return OPENSSL_VERSION_NUMBER; -} +unsigned long OpenSSL_version_num(void) { return OPENSSL_VERSION_NUMBER; } -int CRYPTO_malloc_init(void) { - return 1; -} +int CRYPTO_malloc_init(void) { return 1; } + +int OPENSSL_malloc_init(void) { return 1; } void ENGINE_load_builtin_engines(void) {} -int ENGINE_register_all_complete(void) { - return 1; -} +int ENGINE_register_all_complete(void) { return 1; } void OPENSSL_load_builtin_modules(void) {} diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index ccf5012c..cc6fc3ca 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -92,6 +92,9 @@ OPENSSL_EXPORT unsigned long OpenSSL_version_num(void); // CRYPTO_malloc_init returns one. OPENSSL_EXPORT int CRYPTO_malloc_init(void); +// OPENSSL_malloc_init returns one. +OPENSSL_EXPORT int OPENSSL_malloc_init(void); + // ENGINE_load_builtin_engines does nothing. OPENSSL_EXPORT void ENGINE_load_builtin_engines(void);