summaryrefslogtreecommitdiff
path: root/dev-libs
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/Manifest.gzbin95758 -> 95925 bytes
-rw-r--r--dev-libs/openpace/Manifest5
-rw-r--r--dev-libs/openpace/files/openpace-1.1.2-openssl-3.0.patch76
-rw-r--r--dev-libs/openpace/files/openpace-1.1.2-openssl.patch25
-rw-r--r--dev-libs/openpace/metadata.xml11
-rw-r--r--dev-libs/openpace/openpace-1.1.2.ebuild51
6 files changed, 168 insertions, 0 deletions
diff --git a/dev-libs/Manifest.gz b/dev-libs/Manifest.gz
index 944f9e027399..bdcb38c94736 100644
--- a/dev-libs/Manifest.gz
+++ b/dev-libs/Manifest.gz
Binary files differ
diff --git a/dev-libs/openpace/Manifest b/dev-libs/openpace/Manifest
new file mode 100644
index 000000000000..92e849f60ddd
--- /dev/null
+++ b/dev-libs/openpace/Manifest
@@ -0,0 +1,5 @@
+AUX openpace-1.1.2-openssl-3.0.patch 2175 BLAKE2B faba644f0c755c265dd0ee6f3aaa1174822bb5d096d8622c7bcd6efce36b850dcd8bff73907b9f9d0fab9b600420fc385f76b3ba957ae9cb869bb7ccecae87f3 SHA512 1e6a9607540c8d20612552c82ba87e72251294196f24b52a1ec1ab8f8b05504486260563d68b8875f731db4eb58f75bf8e511bec473daaf49a43001c6e4fa06d
+AUX openpace-1.1.2-openssl.patch 630 BLAKE2B abe24552c9a8fb48b20636c7c63b5a9df11536cceadccd73f668daa55522c5dbe6ab3243db3e8d0244ac68bc8ba0482a1716a4ecf9fe5cd20cd9a90133223a1d SHA512 88e36ab11921a44546905dceab5fc8cd500e953f931443c1f645e77446c66d748e03f4758c8077d0644c5a5e6e69ce1ae7be38d2f50c8642fb87b602e43f94a1
+DIST openpace-1.1.2.tar.gz 3040254 BLAKE2B 4320b0ec01e80379f8c6b1812af6e7b09a8305a448caf432735554d05380b2f29133e92bffab62ad31077c410eceb5d0c68d65343394ebc24aa92dbefe321549 SHA512 812852300cee2ba021809b6c1caa686ecb7fe3eb23bcc7f4c0ce34258460f685bd70027f62f046643710bc549c0037af80d26d7089dd71341818ec7ec1db8d94
+EBUILD openpace-1.1.2.ebuild 947 BLAKE2B 79cd39c3de9605615993cab3609c57ac558cf73b11de33ae69839ca173f78eea08d22512cba61a0675d1a5d141690bf3ebb5d0cb0acf28ea62bace10398b3920 SHA512 c342d77171aa112b10dcf8c7733a95f172d88d9b4e7e7a75edf0fafdbd2df8075777f6595b9a5619d46174d7d9ee25adda361770d31560b5ffb09de515b8f3ed
+MISC metadata.xml 331 BLAKE2B 4152c2350a69f9d5907917ef5d385da95cedcade149594c682724de55c823da8667a14880342142024a511a3f9aac9dc56d672e7c44888756e742c560b906cf5 SHA512 80bb084ebf352a333c438a6a7cac48387d5a0e285ad7859dc76111d85950cb8ecf6fc80e07befde77c02a44bde8f19f375b48147e76749e602e3bf58a4d3f46b
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
+}