[U-Boot] [PATCH v2 2/3] rsa: Fix deprecated warnings for OpenSSL 1.1.x
Jelle van der Waa
jelle at vdwaa.nl
Tue Apr 4 21:59:49 UTC 2017
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 <jelle at vdwaa.nl>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
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
More information about the U-Boot
mailing list