]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools/kwbimage: fix LibreSSL build
authorJonathan Gray <jsg@jsg.id.au>
Tue, 20 Feb 2018 15:59:01 +0000 (02:59 +1100)
committerTom Rini <trini@konsulko.com>
Fri, 23 Feb 2018 15:40:51 +0000 (10:40 -0500)
Fix build after addition of RSA_get0_key() to LibreSSL.
Patch from Theo Buehler and Stuart Henderson.

Signed-off-by: Theo Buehler <tb@openbsd.org>
Signed-off-by: Stuart Henderson <sthen@openbsd.org>
tools/kwbimage.c

index ccecf8718537b04250a252adbf91f56ba6509772..3ca3b3b4a62f40e60d6d93fa70b2578803fa7ce2 100644 (file)
@@ -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);