From: Jonathan Gray Date: Tue, 20 Feb 2018 15:59:01 +0000 (+1100) Subject: tools/kwbimage: fix LibreSSL build X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=a2d5efd74fb2e6893bcebfae41ea600bc7b65e6e;p=u-boot.git tools/kwbimage: fix LibreSSL build Fix build after addition of RSA_get0_key() to LibreSSL. Patch from Theo Buehler and Stuart Henderson. Signed-off-by: Theo Buehler Signed-off-by: Stuart Henderson --- diff --git a/tools/kwbimage.c b/tools/kwbimage.c index ccecf87185..3ca3b3b4a6 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -24,7 +24,8 @@ #include #include -#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);