Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ACF4AECAAD4 for ; Mon, 29 Aug 2022 11:38:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6A93A84382; Mon, 29 Aug 2022 13:38:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 05BEB8458A; Mon, 29 Aug 2022 13:38:56 +0200 (CEST) Received: from sibelius.xs4all.nl (80-61-163-207.fixed.kpn.net [80.61.163.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7B4E083FCA for ; Mon, 29 Aug 2022 13:38:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=mark.kettenis@xs4all.nl Received: from localhost (bloch.sibelius.xs4all.nl [local]) by bloch.sibelius.xs4all.nl (OpenSMTPD) with ESMTPA id 1f69e06d; Mon, 29 Aug 2022 13:38:52 +0200 (CEST) Date: Mon, 29 Aug 2022 13:38:52 +0200 (CEST) From: Mark Kettenis To: Jonathan Gray Cc: kettenis@openbsd.org, u-boot@lists.denx.de, jagan@amarulasolutions.com, andre.przywara@arm.com, sjg@chromium.org, michal.vasilek@nic.cz In-Reply-To: (message from Jonathan Gray on Mon, 29 Aug 2022 00:37:55 +1000) Subject: Re: [PATCH] tools: mkimage: fix build with recent LibreSSL References: <20220827172344.69560-1-kettenis@openbsd.org> Message-ID: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean > Date: Mon, 29 Aug 2022 00:37:55 +1000 > From: Jonathan Gray > > On Sat, Aug 27, 2022 at 07:23:44PM +0200, Mark Kettenis wrote: > > Recent versions of LibreSSL, such as those shipped as part of > > OpenBSD 7.1 and later have an opaque RSA object and do provide the > > RSA_get0_* functions that OpenSSL provides. > > part of 3.5.0 / 0x3050000fL as well > https://lists.denx.de/pipermail/u-boot/2022-July/489768.html > https://marc.info/?l=libressl&m=164572407401570&w=2 Hmm, I thought I'd checked the 3.5.0 tarball, but apparently I didn't. Just posted v2 with the version check adjusted. > > Fixes: 2ecc354b8e46 ("tools: mkimage: fix build with LibreSSL") > > Signed-off-by: Mark Kettenis > > --- > > tools/sunxi_toc0.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/sunxi_toc0.c b/tools/sunxi_toc0.c > > index 56200bd927..eb5626411c 100644 > > --- a/tools/sunxi_toc0.c > > +++ b/tools/sunxi_toc0.c > > @@ -34,7 +34,7 @@ > > #define pr_warn(fmt, args...) fprintf(stderr, pr_fmt(fmt), "warning", ##args) > > #define pr_info(fmt, args...) fprintf(stderr, pr_fmt(fmt), "info", ##args) > > > > -#if defined(LIBRESSL_VERSION_NUMBER) > > +#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050100fL > > #define RSA_get0_n(key) (key)->n > > #define RSA_get0_e(key) (key)->e > > #define RSA_get0_d(key) (key)->d > > -- > > 2.37.2 > > > > >