1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 17:52:07 +02:00

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 <tb@openbsd.org>
Signed-off-by: Stuart Henderson <sthen@openbsd.org>
This commit is contained in:
Jonathan Gray
2018-02-21 02:59:01 +11:00
committed by Tom Rini
parent 744247de29
commit a2d5efd74f

View File

@@ -24,7 +24,8 @@
#include <openssl/err.h> #include <openssl/err.h>
#include <openssl/evp.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, static void RSA_get0_key(const RSA *r,
const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
{ {
@@ -36,7 +37,7 @@ static void RSA_get0_key(const RSA *r,
*d = r->d; *d = r->d;
} }
#else #elif !defined(LIBRESSL_VERSION_NUMBER)
void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
{ {
EVP_MD_CTX_reset(ctx); EVP_MD_CTX_reset(ctx);