diff mbox

[U-Boot,v2,2/3] rsa: Fix deprecated warnings for OpenSSL 1.1.x

Message ID 20170404215950.6588-2-jelle@vdwaa.nl
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Jelle van der Waa April 4, 2017, 9:59 p.m. UTC
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@vdwaa.nl>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
 lib/rsa/rsa-sign.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

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();