diff options
author | David Seifert <soap@gentoo.org> | 2022-09-23 12:00:20 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2022-09-23 12:00:20 +0200 |
commit | 74eda8cbca56e0d786fef6caf55ce318ad9d701a (patch) | |
tree | 83b068098139dad855f0aa9aad776e7b71b17d24 /dev-libs/openpace | |
parent | app-text/pdftk: add 3.3.3 (diff) | |
download | gentoo-74eda8cbca56e0d786fef6caf55ce318ad9d701a.tar.gz gentoo-74eda8cbca56e0d786fef6caf55ce318ad9d701a.tar.bz2 gentoo-74eda8cbca56e0d786fef6caf55ce318ad9d701a.zip |
dev-libs/openpace: new package, add 1.1.2
Bug: https://bugs.gentoo.org/861545
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-libs/openpace')
-rw-r--r-- | dev-libs/openpace/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch | 76 | ||||
-rw-r--r-- | dev-libs/openpace/files/openpace-1.1.2-openssl.patch | 25 | ||||
-rw-r--r-- | dev-libs/openpace/metadata.xml | 11 | ||||
-rw-r--r-- | dev-libs/openpace/openpace-1.1.2.ebuild | 51 |
5 files changed, 164 insertions, 0 deletions
diff --git a/dev-libs/openpace/Manifest b/dev-libs/openpace/Manifest new file mode 100644 index 000000000000..6354998f89d6 --- /dev/null +++ b/dev-libs/openpace/Manifest @@ -0,0 +1 @@ +DIST openpace-1.1.2.tar.gz 3040254 BLAKE2B 4320b0ec01e80379f8c6b1812af6e7b09a8305a448caf432735554d05380b2f29133e92bffab62ad31077c410eceb5d0c68d65343394ebc24aa92dbefe321549 SHA512 812852300cee2ba021809b6c1caa686ecb7fe3eb23bcc7f4c0ce34258460f685bd70027f62f046643710bc549c0037af80d26d7089dd71341818ec7ec1db8d94 diff --git a/dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch b/dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch new file mode 100644 index 000000000000..d2ac244a1a7d --- /dev/null +++ b/dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch @@ -0,0 +1,76 @@ +From 2d94a152dd36543d2a713f1abe20717fdaafae0a Mon Sep 17 00:00:00 2001 +From: Frank Morgner <frankmorgner@gmail.com> +Date: Sat, 18 Dec 2021 00:15:04 +0100 +Subject: [PATCH] added basic compatibility with OpenSSL 3.0 + +deprecated warnings are not handled for now + +fixes https://github.com/frankmorgner/openpace/issues/53 +--- + src/eac/cv_cert.h | 6 +++++- + src/eac_util.c | 14 ++++++++++++++ + 2 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/src/eac/cv_cert.h b/src/eac/cv_cert.h +index f8c6565..595eb9c 100644 +--- a/src/eac/cv_cert.h ++++ b/src/eac/cv_cert.h +@@ -341,7 +341,11 @@ CVC_CERT *CVC_d2i_CVC_CERT(CVC_CERT **cert, const unsigned char **in, long len); + * @return Number of bytes successfully encoded or a negative value if an + * error occured. + */ +-int i2d_CVC_CERT(CVC_CERT *a, unsigned char **out); ++int i2d_CVC_CERT( ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ const ++#endif ++ CVC_CERT *a, unsigned char **out); + + /** + * @brief Duplicate a CV certificate +diff --git a/src/eac_util.c b/src/eac_util.c +index e87293c..6e518e0 100644 +--- a/src/eac_util.c ++++ b/src/eac_util.c +@@ -321,6 +321,8 @@ randb(int numbytes) + return NULL; + } + ++#include <openssl/provider.h> ++ + BUF_MEM * + retail_mac_des(const BUF_MEM * key, const BUF_MEM * in) + { +@@ -331,6 +333,11 @@ retail_mac_des(const BUF_MEM * key, const BUF_MEM * in) + + check(key, "Invalid arguments"); + ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ OSSL_PROVIDER *legacy; ++ legacy = OSSL_PROVIDER_load(NULL, "legacy"); ++#endif ++ + len = EVP_CIPHER_block_size(EVP_des_cbc()); + check(key->length >= 2*len, "Key too short"); + +@@ -369,6 +376,9 @@ retail_mac_des(const BUF_MEM * key, const BUF_MEM * in) + BUF_MEM_free(c_tmp); + BUF_MEM_free(d_tmp); + EVP_CIPHER_CTX_free(ctx); ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ OSSL_PROVIDER_unload(legacy); ++#endif + + return mac; + +@@ -381,6 +391,10 @@ retail_mac_des(const BUF_MEM * key, const BUF_MEM * in) + BUF_MEM_free(d_tmp); + if (ctx) + EVP_CIPHER_CTX_free(ctx); ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++ if (legacy) ++ OSSL_PROVIDER_unload(legacy); ++#endif + + return NULL; + } diff --git a/dev-libs/openpace/files/openpace-1.1.2-openssl.patch b/dev-libs/openpace/files/openpace-1.1.2-openssl.patch new file mode 100644 index 000000000000..8802c2528f18 --- /dev/null +++ b/dev-libs/openpace/files/openpace-1.1.2-openssl.patch @@ -0,0 +1,25 @@ +From 8b2c8a76873da4862dbf4240c901f3e6d4bc040a Mon Sep 17 00:00:00 2001 +From: Frank Morgner <frankmorgner@gmail.com> +Date: Sat, 18 Dec 2021 00:15:39 +0100 +Subject: [PATCH] fixed outdated API usage of BN_zero + +returns void since 0.9.8 +--- + src/eac.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/eac.c b/src/eac.c +index ea84253..9dccd79 100644 +--- a/src/eac.c ++++ b/src/eac.c +@@ -105,7 +105,9 @@ int EAC_reset_ssc(const EAC_CTX *ctx) + if (!ctx) + return 0; + +- return BN_zero(ctx->ssc); ++ BN_zero(ctx->ssc); ++ ++ return 1; + } + + int EAC_set_ssc(const EAC_CTX *ctx, unsigned long ssc) diff --git a/dev-libs/openpace/metadata.xml b/dev-libs/openpace/metadata.xml new file mode 100644 index 000000000000..c762dd72a1de --- /dev/null +++ b/dev-libs/openpace/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>soap@gentoo.org</email> + <name>David Seifert</name> + </maintainer> + <upstream> + <remote-id type="github">frankmorgner/openpace</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-libs/openpace/openpace-1.1.2.ebuild b/dev-libs/openpace/openpace-1.1.2.ebuild new file mode 100644 index 000000000000..308f5d566c47 --- /dev/null +++ b/dev-libs/openpace/openpace-1.1.2.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Cryptographic library for EAC version 2" +HOMEPAGE="https://frankmorgner.github.io/openpace" +SRC_URI="https://github.com/frankmorgner/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0/3" +KEYWORDS="~amd64 ~x86" + +BDEPEND=" + dev-util/gengetopt + sys-apps/help2man + virtual/pkgconfig" +DEPEND="dev-libs/openssl:=" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-openssl.patch + "${FILESDIR}"/${P}-openssl-3.0.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --disable-openssl-install \ + --disable-go \ + --disable-java \ + --disable-python \ + --disable-ruby +} + +src_compile() { + # not running just 1 job causes a race condition that causes a linking error + emake -j1 +} + +src_install() { + default + + find "${ED}" -type f -name '*.la' -delete || die +} |