Skip to contentSkip to conversation

tools/kwbimage: fix LibreSSL build

PATCH In review Jonathan Gray 2 participants 2 messages Feb 20, 2018 – Feb 23, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/kwbimage: fix LibreSSL build

Fix build after addition of RSA_get0_key() to LibreSSL. Patch from Theo Buehler and Stuart Henderson.

---
 tools/kwbimage.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/kwbimage.c +3 -2
index ccecf87185..3ca3b3b4a6 100644
@@ -24,7 +24,8 @@
 #include <openssl/err.h>
 #include <openssl/evp.h>
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
 static void RSA_get0_key(const RSA *r,
                  const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
 {
@@ -36,7 +37,7 @@ static void RSA_get0_key(const RSA *r,
        *d = r->d;
 }
 
-#else
+#elif !defined(LIBRESSL_VERSION_NUMBER)
 void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
 {
 	EVP_MD_CTX_reset(ctx);
Signature · 1 line
2.16.0
#1 lore raw
Quoted 5 lines · Jonathan Gray

Fix build after addition of RSA_get0_key() to LibreSSL. Patch from Theo Buehler and Stuart Henderson.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180223/3c4cc9a5/attachment.sig>