From: Jelle van der Waa Date: Mon, 13 Feb 2017 10:00:37 +0100 Subject: [U-Boot] [PATCH 2/2] rsa: Fix deprecated warnings for OpenSSL 1.1.x In-Reply-To: <20170213090037.29223-1-jelle@vdwaa.nl> References: <20170213090037.29223-1-jelle@vdwaa.nl> Message-ID: <20170213090037.29223-2-jelle@vdwaa.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de ERR_remove_thread_state is deprecated in OpenSSL 1.1.x and does not do anything anymore. Thread initialisation and deinitialisation is now handled by the OpenSSL library. Signed-off-by: Jelle van der Waa --- lib/rsa/rsa-sign.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index 965fb00f95..347a6aa89e 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -16,10 +16,6 @@ #include #include -#if OPENSSL_VERSION_NUMBER >= 0x10000000L -#define HAVE_ERR_REMOVE_THREAD_STATE -#endif - #if OPENSSL_VERSION_NUMBER < 0x10100000L void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) @@ -356,9 +352,9 @@ static void rsa_remove(void) { CRYPTO_cleanup_all_ex_data(); ERR_free_strings(); -#ifdef HAVE_ERR_REMOVE_THREAD_STATE +#if OPENSSL_VERSION_NUMBER >= 0x10000000L && OPENSSL_VERSION_NUMBER < 0x10100000L ERR_remove_thread_state(NULL); -#else +#elif OPENSSL_VERSION_NUMBER < 0x10000000L ERR_remove_state(0); #endif EVP_cleanup(); -- 2.11.1