summaryrefslogtreecommitdiff
path: root/app-crypt/sbsigntools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-15 09:32:31 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-15 09:32:31 +0000
commitffec4b922807fb67af8fdef84ac67f52e9168f81 (patch)
tree4fa2bb5a88f6af2e86c4421917d6e969e3b780ad /app-crypt/sbsigntools
parent337b0e33a7c7a910e94b011161f8ea67c6be10c4 (diff)
gentoo auto-resync : 15:12:2022 - 09:32:31
Diffstat (limited to 'app-crypt/sbsigntools')
-rw-r--r--app-crypt/sbsigntools/Manifest2
-rw-r--r--app-crypt/sbsigntools/files/sbsigntools-0.9.4-openssl3.patch35
-rw-r--r--app-crypt/sbsigntools/sbsigntools-0.9.4-r1.ebuild53
3 files changed, 90 insertions, 0 deletions
diff --git a/app-crypt/sbsigntools/Manifest b/app-crypt/sbsigntools/Manifest
index a7b71a37f098..ab88b3029aa8 100644
--- a/app-crypt/sbsigntools/Manifest
+++ b/app-crypt/sbsigntools/Manifest
@@ -1,5 +1,7 @@
AUX sbsigntools-0.9.4-no-werror.patch 483 BLAKE2B 9a25f9a4057bf8738ad3b32542c990376ee723fca383177fdcebc9cb708816877d320b4584b5adf916217e7026d9746fd39fbb7fd975ebce8b5fdfe60675341b SHA512 e20a4a8b6b5372471a33e25c0c241cb6aff731a7c781aaff8c1d52c7fa06c158438049643ffd9ba8c49c2e5003798dba18371c2294061e594e4c1ed062f5dbfd
+AUX sbsigntools-0.9.4-openssl3.patch 1313 BLAKE2B 606f51976b5cdff6398330e95e820b07f8cc625549686178014780445cee5c00463b728abebe68b276d642121ad963f43244a0c8e94bf8ca1373c2c63c6c260c SHA512 e6cd2ce156935df31e6d1a8a4712ea94d15c5b3e7e4b02bdb564d9b5eb2daeff73694b60267219c7d7a7ebc1013491c6dc27127b54d6ebb6f4d4623c728925ad
DIST sbsigntool-0.8-ccan.tar.gz 113537 BLAKE2B 8fbf27463d30c1895930628a145be2d521ae4f6adb7af3299bf2f5f4319fd643df0a07347ef6851bd41d233af4c3fc5f77002771af1c43aa0f20665aef2390b8 SHA512 6857096879f116f1802eb6b44789cbea7bb24440bc0f16503aeadf5f276fa45943f322f844dbb9abee717655205d82b830143be3a7f4424fd4146b9360674a09
DIST sbsigntools-0.9.4.tar.gz 57714 BLAKE2B 94797af6c98a9c13cb71e52ba6f7ff07de70660af2194b14061e0cb618d6effff52ef7a4dd2fd4e44e75f022b979442d4290b1d65d63017b2fbebdca5951c5c9 SHA512 953d3d9a7f92b837da966eabe3572163a29c5292e792d5ef17cf842d7373ffaa901377cb4ec68006a6ef2f9c97d48db8ffdd3a6d2853be67016d3484a118bba9
+EBUILD sbsigntools-0.9.4-r1.ebuild 1380 BLAKE2B 2ca53a6e58a6ab09d7f34a222ed6c8433a33c31d353867251a3c18577d7055144d78985827c9887169c9057bbb873e01570b201f41e6ad3fcfa5fbd14a666d7f SHA512 c1927e3b68095a117026f75a0f00b52f05a311bda1ada2c359c4cb72243b3f40001e8cd68d99d67f4250570e3ede376c9de5bc01aa96fc1e05af02e0a1a92057
EBUILD sbsigntools-0.9.4.ebuild 1335 BLAKE2B 91f1b7173cae871d44706b1ed8038386a09233ee2dd648c8bd698066af2ed686f628900b3d9a3e27d3ff657a53c22034f4b482f68458b682bffab5081634aed1 SHA512 73aa0460dac41c479678e90d9f3ad073360385183b33222c5f95521f9cd2a4a8c375ee36ed2f4dccef3ac7e5eed7682977c6f1faba757a3e5b643dfd1a72b792
MISC metadata.xml 292 BLAKE2B 590a17ca49fb39917074648d0b2439e707a49055f7b65cc923500cfe354b51aa020c3899b14d7de263c97f281aad36c19695f54747c7652bf46ce26d7a14b5d7 SHA512 230e2b4d2b6858ab067cb5ffe9e59b93fa22abe34bbebe74f0eca9a1f96fcfb9bbe536ed34c1bf8d977e8dfc7b46a6d44feb541d3426e6ada42f35f92ac7c896
diff --git a/app-crypt/sbsigntools/files/sbsigntools-0.9.4-openssl3.patch b/app-crypt/sbsigntools/files/sbsigntools-0.9.4-openssl3.patch
new file mode 100644
index 000000000000..3fffe9b668eb
--- /dev/null
+++ b/app-crypt/sbsigntools/files/sbsigntools-0.9.4-openssl3.patch
@@ -0,0 +1,35 @@
+Subject: [PATCH] Fix openssl-3.0 issue involving ASN1 xxx_it
+From: Jeremi Piotrowski <jeremi.piotrowski@microsoft.com>
+Origin: https://groups.io/g/sbsigntools/message/54
+
+Use ASN1_ITEM_rptr() instead of taking the address of IDC_PEID_it.
+
+openssl-3.0 changed the type of TYPE_it from `const ASN1_ITEM TYPE_it` to
+`const ASN1_ITEM *TYPE_it(void)`. This was previously hidden behind
+OPENSSL_EXPORT_VAR_AS_FUNCTION but in 3.0 only the function version is
+available. This change should have been transparent to the application, but
+only if the `ASN1_ITEM_rptr()` macro is used.
+
+This change passes `make check` with both openssl 1.1 and 3.0.
+
+Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
+---
+ src/idc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/idc.c b/src/idc.c
+index 6d87bd4..0a82218 100644
+--- a/src/idc.c
++++ b/src/idc.c
+@@ -189,7 +189,7 @@ int IDC_set(PKCS7 *p7, PKCS7_SIGNER_INFO *si, struct image *image)
+
+ idc->data->type = OBJ_nid2obj(peid_nid);
+ idc->data->value = ASN1_TYPE_new();
+- type_set_sequence(image, idc->data->value, peid, &IDC_PEID_it);
++ type_set_sequence(image, idc->data->value, peid, ASN1_ITEM_rptr(IDC_PEID));
+
+ idc->digest->alg->parameter = ASN1_TYPE_new();
+ idc->digest->alg->algorithm = OBJ_nid2obj(NID_sha256);
+--
+2.25.1
+
diff --git a/app-crypt/sbsigntools/sbsigntools-0.9.4-r1.ebuild b/app-crypt/sbsigntools/sbsigntools-0.9.4-r1.ebuild
new file mode 100644
index 000000000000..5a78ca4edd5a
--- /dev/null
+++ b/app-crypt/sbsigntools/sbsigntools-0.9.4-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+MY_PN="${PN::-1}"
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Utilities for signing and verifying files for UEFI Secure Boot"
+HOMEPAGE="https://git.kernel.org/cgit/linux/kernel/git/jejb/sbsigntools.git/"
+SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/jejb/${PN}.git/snapshot/${P}.tar.gz
+ https://dev.gentoo.org/~tamiko/distfiles/${MY_PN}-0.8-ccan.tar.gz"
+
+LICENSE="GPL-3 LGPL-3 LGPL-2.1 CC0-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/openssl:0=
+ sys-apps/util-linux"
+DEPEND="${RDEPEND}
+ sys-apps/help2man
+ sys-boot/gnu-efi
+ sys-libs/binutils-libs
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.4-no-werror.patch
+ "${FILESDIR}"/${PN}-0.9.4-openssl3.patch
+)
+
+src_prepare() {
+ mv "${WORKDIR}"/lib/ccan "${S}"/lib || die "mv failed"
+ rmdir "${WORKDIR}"/lib || die "rmdir failed"
+
+ local iarch
+ case ${ARCH} in
+ amd64) iarch=x86_64 ;;
+ arm64) iarch=aarch64 ;;
+ ia64) iarch=ia64 ;;
+ riscv) iarch=riscv64 ;;
+ x86) iarch=ia32 ;;
+ *) die "unsupported architecture: ${ARCH}" ;;
+ esac
+ sed -i "/^EFI_ARCH=/s:=.*:=${iarch}:" configure.ac || die
+ sed -i 's/-m64$/& -march=x86-64/' tests/Makefile.am || die
+ sed -i "/^AR /s:=.*:= $(tc-getAR):" lib/ccan/Makefile.in || die #481480
+
+ default
+ eautoreconf
+}