All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jelle van der Waa <jelle@vdwaa.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] rsa: Fix deprecated warnings for OpenSSL 1.1.x
Date: Mon, 13 Feb 2017 10:00:37 +0100	[thread overview]
Message-ID: <20170213090037.29223-2-jelle@vdwaa.nl> (raw)
In-Reply-To: <20170213090037.29223-1-jelle@vdwaa.nl>

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>
---
 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 <openssl/evp.h>
 #include <openssl/engine.h>
 
-#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

  reply	other threads:[~2017-02-13  9:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13  9:00 [U-Boot] [PATCH 1/2] rsa: Fix build with OpenSSL 1.1.x Jelle van der Waa
2017-02-13  9:00 ` Jelle van der Waa [this message]
2017-02-22  3:59   ` [U-Boot] [PATCH 2/2] rsa: Fix deprecated warnings for " Simon Glass
2017-02-13  9:57 ` [U-Boot] [PATCH 1/2] rsa: Fix build with " Peter Robinson
2017-02-14 12:43   ` Peter Robinson
2017-02-14 22:14     ` Jelle van der Waa
2017-02-16  1:59 ` Jonathan Gray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170213090037.29223-2-jelle@vdwaa.nl \
    --to=jelle@vdwaa.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.