From patchwork Tue Feb 20 15:59:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Gray X-Patchwork-Id: 875796 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zmF5w3fPfz9s2V for ; Wed, 21 Feb 2018 09:04:51 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 798F9C21EA6; Tue, 20 Feb 2018 15:59:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5B2F6C21DA2; Tue, 20 Feb 2018 15:59:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BEB01C21DAF; Tue, 20 Feb 2018 15:59:08 +0000 (UTC) Received: from lechuck.jsg.id.au (jsg.id.au [210.15.216.215]) by lists.denx.de (Postfix) with ESMTPS id 41E19C21DA6 for ; Tue, 20 Feb 2018 15:59:06 +0000 (UTC) Received: from largo.jsg.id.au (largo.jsg.id.au [192.168.1.43]) by lechuck.jsg.id.au (OpenSMTPD) with ESMTP id da6e0206; Wed, 21 Feb 2018 02:59:01 +1100 (AEDT) Received: from largo.jsg.id.au (localhost [127.0.0.1]) by largo.jsg.id.au (OpenSMTPD) with ESMTP id 2c006a11; Wed, 21 Feb 2018 02:59:01 +1100 (AEDT) From: Jonathan Gray To: u-boot@lists.denx.de Date: Wed, 21 Feb 2018 02:59:01 +1100 Message-Id: <20180220155901.71215-1-jsg@jsg.id.au> X-Mailer: git-send-email 2.14.2 Cc: Stuart Henderson , Theo Buehler Subject: [U-Boot] [PATCH] tools/kwbimage: fix LibreSSL build X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- tools/kwbimage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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);