From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jelle van der Waa Date: Tue, 4 Apr 2017 23:59:49 +0200 Subject: [U-Boot] [PATCH v2 2/3] rsa: Fix deprecated warnings for OpenSSL 1.1.x In-Reply-To: <20170404215950.6588-1-jelle@vdwaa.nl> References: <20170404215950.6588-1-jelle@vdwaa.nl> Message-ID: <20170404215950.6588-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 Reviewed-by: Simon Glass --- lib/rsa/rsa-sign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index d4e216cc0e..8a73791fed 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -356,9 +356,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 || defined(LIBRESSL_VERSION_NUMBER) ERR_remove_thread_state(NULL); -#else +#elif OPENSSL_VERSION_NUMBER < 0x10000000L ERR_remove_state(0); #endif EVP_cleanup(); -- 2.12.2