From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6F7FB158020 for ; Wed, 21 Dec 2022 02:58:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AA19EE0960; Wed, 21 Dec 2022 02:58:46 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 88FEDE0960 for ; Wed, 21 Dec 2022 02:58:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 49113341692 for ; Wed, 21 Dec 2022 02:58:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8A94D785 for ; Wed, 21 Dec 2022 02:58:43 +0000 (UTC) From: "Julien Roy" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Julien Roy" Message-ID: <1671591512.9c156d7fcfb4d76fbb14570df5e9a8d1e77e183e.julien@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-crypt/clevis/files/, app-crypt/clevis/ X-VCS-Repository: repo/proj/guru X-VCS-Files: app-crypt/clevis/clevis-18.ebuild app-crypt/clevis/files/clevis-openssl.patch X-VCS-Directories: app-crypt/clevis/files/ app-crypt/clevis/ X-VCS-Committer: julien X-VCS-Committer-Name: Julien Roy X-VCS-Revision: 9c156d7fcfb4d76fbb14570df5e9a8d1e77e183e X-VCS-Branch: dev Date: Wed, 21 Dec 2022 02:58:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 22ec289b-4e6c-4f70-8a21-47f0695c87f5 X-Archives-Hash: b49fd0ecfc6fd161df2ff702e583a3b8 commit: 9c156d7fcfb4d76fbb14570df5e9a8d1e77e183e Author: Julien Roy jroy ca> AuthorDate: Wed Dec 21 02:57:55 2022 +0000 Commit: Julien Roy jroy ca> CommitDate: Wed Dec 21 02:58:32 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9c156d7f app-crypt/clevis: fix for openssl:3 Closes: https://bugs.gentoo.org/887205 Signed-off-by: Julien Roy jroy.ca> app-crypt/clevis/clevis-18.ebuild | 1 + app-crypt/clevis/files/clevis-openssl.patch | 44 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/app-crypt/clevis/clevis-18.ebuild b/app-crypt/clevis/clevis-18.ebuild index da0dc9637..a08573ab8 100644 --- a/app-crypt/clevis/clevis-18.ebuild +++ b/app-crypt/clevis/clevis-18.ebuild @@ -26,4 +26,5 @@ BDEPEND="" PATCHES=( "${FILESDIR}/${PN}-dracut.patch" "${FILESDIR}/${PN}-meson.patch" + "${FILESDIR}/${PN}-openssl.patch" ) diff --git a/app-crypt/clevis/files/clevis-openssl.patch b/app-crypt/clevis/files/clevis-openssl.patch new file mode 100644 index 000000000..5b9090980 --- /dev/null +++ b/app-crypt/clevis/files/clevis-openssl.patch @@ -0,0 +1,44 @@ +From ee1dfedb9baca107e66a0fec76693c9d479dcfd9 Mon Sep 17 00:00:00 2001 +From: Sergio Correia +Date: Mon, 3 May 2021 22:36:36 -0300 +Subject: [PATCH] sss: use BN_set_word(x, 0) instead of BN_zero() + +Different OpenSSL versions define BN_zero() differently -- sometimes +returning an integer, sometimes as void --, so let's use instead +BN_set_word() instead, not to have issues when building with these +different versions. +--- + src/pins/sss/sss.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/pins/sss/sss.c b/src/pins/sss/sss.c +index a37215d7..7486d6c5 100644 +--- a/src/pins/sss/sss.c ++++ b/src/pins/sss/sss.c +@@ -214,7 +214,7 @@ sss_point(const json_t *sss, size_t *len) + if (BN_rand_range(xx, pp) <= 0) + return NULL; + +- if (BN_zero(yy) <= 0) ++ if (BN_set_word(yy, 0) <= 0) + return NULL; + + for (size_t i = 0; i < json_array_size(e); i++) { +@@ -272,7 +272,7 @@ sss_recover(const json_t *p, size_t npnts, const uint8_t *pnts[]) + if (!ctx || !pp || !acc || !tmp || !k) + return NULL; + +- if (BN_zero(k) <= 0) ++ if (BN_set_word(k, 0) <= 0) + return NULL; + + len = jose_b64_dec(p, NULL, 0); +@@ -303,7 +303,7 @@ sss_recover(const json_t *p, size_t npnts, const uint8_t *pnts[]) + + /* acc *= (0 - xi) / (xo - xi) */ + +- if (BN_zero(tmp) <= 0) ++ if (BN_set_word(tmp, 0) <= 0) + return NULL; + + if (BN_mod_sub(tmp, tmp, xi, pp, ctx) <= 0)