From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFD29C4338F for ; Sat, 31 Jul 2021 17:00:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3155160C3F for ; Sat, 31 Jul 2021 17:00:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3155160C3F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7AE3183265; Sat, 31 Jul 2021 19:00:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="A2wecvmU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2110E82C2D; Sat, 31 Jul 2021 18:59:54 +0200 (CEST) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3782E82C24 for ; Sat, 31 Jul 2021 18:59:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-wr1-x42d.google.com with SMTP id c16so15622235wrp.13 for ; Sat, 31 Jul 2021 09:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pk/2kp4Wby/krFMihiZaheeTRF5Mjc2UfXgb+VH7rWU=; b=A2wecvmUuOMmQF4b0XLKhdaLFfHrtXd+h3mSSnLNHXy8j0gaUZ1LxCDn/i9MMANnhG TPelEvDrJ2WJO6crXM+XuH7aOVxRwjkwl8TjLRd5NoD7KZwW8iGrH3EydRbtwYyIeLI2 jXdZDSk2gGW4WGb7tYDWi21mcQH7++EwUr5ag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pk/2kp4Wby/krFMihiZaheeTRF5Mjc2UfXgb+VH7rWU=; b=SFzO+i+Y7L5lyXygyAHY2zTj+Nap0SsIuDh5bz0hNDjjrxXTToItFnCcqofUheardR YId/1PCUjn/j7JTgQxObhRksRjQTyhvASr73P3LLGoLuGSuNx8NaU/3Lk4c+4cAvImFG tbpHKzfewMMqRfd4eZRJJ/1uPKRYGTMCsE+N0veOANZrCwtiJx/euS1ZEKoozYb5iLJ/ jh0vtCrtlUL5sCwWw7Bc6qG1blxFGvJ8PkimvtyVtBvknuMcn9FCAB/4Pdnt7NuFtYdt z7mzFp6l/ob8kvyd6pbxRgSfyUTlryCgEbrvsarmQ9pwg9cTrHmwzly5CtCCNFqcLHU+ Nd9A== X-Gm-Message-State: AOAM5325i3zukjX8gUbh43V542rO0SAuCxMH41NnXvTMoGiChhdvBg1K cEoAyDFDQk4ucYHh8FKNqr9SWhcXZ70lVXcn3b5lrNy5GLB6tg== X-Google-Smtp-Source: ABdhPJwMP/q963bjQAz+7Isaaz4kOlEsqF2iAUXnT0/1WU/LLQjJayhA6Ynkt3cJUppd77zYkzNq9PlTQgyR/2AilVc= X-Received: by 2002:adf:f8c8:: with SMTP id f8mr5912805wrq.204.1627750789426; Sat, 31 Jul 2021 09:59:49 -0700 (PDT) MIME-Version: 1.0 References: <20210728180434.24645-1-panfilov.artyom@gmail.com> In-Reply-To: From: Simon Glass Date: Sat, 31 Jul 2021 10:59:34 -0600 Message-ID: Subject: Re: [PATCH 1/1] lib/ecdsa: Fix LibreSSL before v2.7.0 To: Jonathan Gray Cc: Artem Panfilov , U-Boot Mailing List , Alexandru Gagniuc Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Hi, On Wed, 28 Jul 2021 at 23:13, Jonathan Gray wrote: > > On Wed, Jul 28, 2021 at 09:04:33PM +0300, Artem Panfilov wrote: > > Fix LibreSSL compilation for versions before v2.7.0. > > Why 2.7.0? I had to disable CONFIG_FIT_SIGNATURE to get the qemu > targets to build on OpenBSD-current (3.4.0) as there is no > BN_bn2binpad(). 2.7.0 is also over three years old at this point. I think it is reasonable to support older libraries but I'm not sure what is reasonable. I am sure there are people using 3 or 4 year-old distributions which might have older libraries? Assuming that is true: Reviewed-by: Simon Glass > > > > > Fix following compilation issue when CONFIG_TOOLS_LIBCRYPTO is enabled: > > tools/lib/ecdsa/ecdsa-libcrypto.o: In function `prepare_ctx': > > ecdsa-libcrypto.c:(.text+0x94): undefined reference to > > `OPENSSL_init_ssl' > > ecdsa-libcrypto.c:(.text+0x148): undefined reference to > > `EC_GROUP_order_bits' > > tools/lib/ecdsa/ecdsa-libcrypto.o: In function > > `ecdsa_check_signature.isra.0': > > ecdsa-libcrypto.c:(.text+0x32c): undefined reference to `ECDSA_SIG_set0' > > tools/lib/ecdsa/ecdsa-libcrypto.o: In function `ecdsa_sign': > > ecdsa-libcrypto.c:(.text+0x42c): undefined reference to `ECDSA_SIG_get0' > > ecdsa-libcrypto.c:(.text+0x443): undefined reference to `BN_bn2binpad' > > ecdsa-libcrypto.c:(.text+0x455): undefined reference to `BN_bn2binpad' > > tools/lib/ecdsa/ecdsa-libcrypto.o: In function `ecdsa_add_verify_data': > > ecdsa-libcrypto.c:(.text+0x5fa): undefined reference to > > `EC_GROUP_order_bits' > > ecdsa-libcrypto.c:(.text+0x642): undefined reference to > > `EC_POINT_get_affine_coordinates' > > > > Signed-off-by: Artem Panfilov > > --- > > lib/ecdsa/ecdsa-libcrypto.c | 80 ++++++++++++++++++++++++++++++++++++- > > 1 file changed, 79 insertions(+), 1 deletion(-) > > [..]