Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tools/, app-crypt/tpm2-tools/files/
Date: Wed, 13 May 2020 13:17:37
Message-Id: 1589375808.3ea12f993b67f45c05a4fb35db9c0d5f0387ea76.juippis@gentoo
1 commit: 3ea12f993b67f45c05a4fb35db9c0d5f0387ea76
2 Author: Salah Coronya <salah.coronya <AT> gmail <DOT> com>
3 AuthorDate: Sat Apr 11 04:25:42 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Wed May 13 13:16:48 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ea12f99
7
8 app-crypt/tpm2-tools: Remove old
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Salah Coronya <salah.coronya <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/15311
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14
15 app-crypt/tpm2-tools/Manifest | 2 -
16 .../files/tpm2-tools-3.1.3-libressl.patch | 81 ----------------------
17 .../files/tpm2-tools-4.1.1-libressl.patch | 26 -------
18 app-crypt/tpm2-tools/tpm2-tools-3.1.4.ebuild | 32 ---------
19 app-crypt/tpm2-tools/tpm2-tools-4.1.1.ebuild | 32 ---------
20 5 files changed, 173 deletions(-)
21
22 diff --git a/app-crypt/tpm2-tools/Manifest b/app-crypt/tpm2-tools/Manifest
23 index 27bb8e1ebee..eb3869a2746 100644
24 --- a/app-crypt/tpm2-tools/Manifest
25 +++ b/app-crypt/tpm2-tools/Manifest
26 @@ -1,3 +1 @@
27 -DIST tpm2-tools-3.1.4.tar.gz 589388 BLAKE2B aaaa9a0158d0658dc2db4734b18ea1d49bd6c0aef84c4f1236f3134245165dccdb0bada69d92f0e5a59ecb1f2973e5cd25924d2b9c4cad2891d9e4f9fb94a84b SHA512 c5e1be4ffab305ee42a8b4a9c9aa4373158259a58844e273465f97a74f913fb12098b9fd81127148be95ecba7378f6a45b96af256dde3101a237e5e33e8e8ccb
28 -DIST tpm2-tools-4.1.1.tar.gz 779914 BLAKE2B 5b347b00508183cbde407e01454df0a7eb3a8080cb5b8f73d153c4972b38b98ac7c066664b54aeedef03b9bfd97b3cff482dbc44d5f11215af9c3c7754380d75 SHA512 25952cf947f0acd16b1a8dbd3ac8573bce85ff970a7e24c290c4f9cd29418e77a3e48ac82c932fbd250887a9303ab301ff92db594c2fffaba47b873382444d26
29 DIST tpm2-tools-4.2.tar.gz 889062 BLAKE2B 434b88e90f953785e57a9e9f18d717c8b6632206dabfc7478ae866e245eadf032ec4f26bb9597d04ea887bc23a8096d7e6fc2748b0e96806cb2989fd7edf9071 SHA512 7aaf549dd77307e5ad93d4b34737d684c8a7384996143124f10b188f5e99860940902cee83538e6957997859420dd430d6d27979b223beae515aab94ac8fb235
30
31 diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-3.1.3-libressl.patch b/app-crypt/tpm2-tools/files/tpm2-tools-3.1.3-libressl.patch
32 deleted file mode 100644
33 index 7c26d6e14f8..00000000000
34 --- a/app-crypt/tpm2-tools/files/tpm2-tools-3.1.3-libressl.patch
35 +++ /dev/null
36 @@ -1,81 +0,0 @@
37 -From a3447989483e09638e6ebeab7eabe6273aa5f3db Mon Sep 17 00:00:00 2001
38 -From: Alon Bar-Lev <alon.barlev@×××××.com>
39 -Date: Fri, 4 Jan 2019 10:33:15 +0200
40 -Subject: [PATCH] build: fixup libressl support and add libressl-2.7
41 -
42 -Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com>
43 -Backport: 5d4cc4ee
44 ----
45 - lib/conversion.c | 6 +++++-
46 - lib/tpm_kdfa.c | 10 +++++++---
47 - 2 files changed, 12 insertions(+), 4 deletions(-)
48 -
49 -diff --git a/lib/conversion.c b/lib/conversion.c
50 -index ce0f5b3..f55af6f 100644
51 ---- a/lib/conversion.c
52 -+++ b/lib/conversion.c
53 -@@ -45,6 +45,10 @@
54 - #include "tpm2_alg_util.h"
55 - #include "tpm2_util.h"
56 -
57 -+#if (OPENSSL_VERSION_NUMBER < 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER)) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) /* OpenSSL 1.1.0 */
58 -+#define LIB_TPM2_OPENSSL_OPENSSL_PRE11
59 -+#endif
60 -+
61 - static bool tpm2_convert_pubkey_ssl(TPMT_PUBLIC *public, pubkey_format format, const char *path);
62 -
63 - pubkey_format tpm2_parse_pubkey_format(const char *label) {
64 -@@ -134,7 +138,7 @@ static bool tpm2_convert_pubkey_ssl(TPMT_PUBLIC *public, pubkey_format format, c
65 - goto error;
66 - }
67 -
68 --#if OPENSSL_VERSION_NUMBER < 0x1010000fL /* OpenSSL 1.1.0 */
69 -+#if defined(LIB_TPM2_OPENSSL_OPENSSL_PRE11)
70 - ssl_rsa_key->e = e;
71 - ssl_rsa_key->n = n;
72 - #else
73 -diff --git a/lib/tpm_kdfa.c b/lib/tpm_kdfa.c
74 -index 3d1ed50..fc03af8 100644
75 ---- a/lib/tpm_kdfa.c
76 -+++ b/lib/tpm_kdfa.c
77 -@@ -34,6 +34,10 @@
78 - #include "log.h"
79 - #include "tpm2_util.h"
80 -
81 -+#if (OPENSSL_VERSION_NUMBER < 0x1010000fL && !defined(LIBRESSL_VERSION_NUMBER)) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) /* OpenSSL 1.1.0 */
82 -+#define LIB_TPM2_OPENSSL_OPENSSL_PRE11
83 -+#endif
84 -+
85 - static const EVP_MD *tpm_algorithm_to_openssl_digest(TPMI_ALG_HASH algorithm) {
86 -
87 - switch(algorithm) {
88 -@@ -54,7 +58,7 @@ static const EVP_MD *tpm_algorithm_to_openssl_digest(TPMI_ALG_HASH algorithm) {
89 - static HMAC_CTX *hmac_alloc()
90 - {
91 - HMAC_CTX *ctx;
92 --#if OPENSSL_VERSION_NUMBER < 0x1010000fL /* OpenSSL 1.1.0 */
93 -+#if defined(LIB_TPM2_OPENSSL_OPENSSL_PRE11)
94 - ctx = malloc(sizeof(*ctx));
95 - #else
96 - ctx = HMAC_CTX_new();
97 -@@ -62,7 +66,7 @@ static HMAC_CTX *hmac_alloc()
98 - if (!ctx)
99 - return NULL;
100 -
101 --#if OPENSSL_VERSION_NUMBER < 0x1010000fL
102 -+#if defined(LIB_TPM2_OPENSSL_OPENSSL_PRE11)
103 - HMAC_CTX_init(ctx);
104 - #endif
105 -
106 -@@ -71,7 +75,7 @@ static HMAC_CTX *hmac_alloc()
107 -
108 - static void hmac_del(HMAC_CTX *ctx)
109 - {
110 --#if OPENSSL_VERSION_NUMBER < 0x1010000fL
111 -+#if defined(LIB_TPM2_OPENSSL_OPENSSL_PRE11)
112 - HMAC_CTX_cleanup(ctx);
113 - free(ctx);
114 - #else
115 ---
116 -2.19.2
117 -
118
119 diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-4.1.1-libressl.patch b/app-crypt/tpm2-tools/files/tpm2-tools-4.1.1-libressl.patch
120 deleted file mode 100644
121 index 2f39db3283c..00000000000
122 --- a/app-crypt/tpm2-tools/files/tpm2-tools-4.1.1-libressl.patch
123 +++ /dev/null
124 @@ -1,26 +0,0 @@
125 -From a1ac2ee0c6592e6f730458c03a2abd1532c66046 Mon Sep 17 00:00:00 2001
126 -From: Salah Coronya <salah.coronya@×××××.com>
127 -Date: Sun, 12 Jan 2020 19:17:48 -0600
128 -Subject: [PATCH] lib/tpm2_openssl.c: Fix build for libressl
129 -
130 -Signed-off-by: Salah Coronya <salah.coronya@×××××.com>
131 ----
132 - lib/tpm2_openssl.c | 2 +-
133 - 1 file changed, 1 insertion(+), 1 deletion(-)
134 -
135 -diff --git a/lib/tpm2_openssl.c b/lib/tpm2_openssl.c
136 -index 505dd7a0..fd3861d9 100644
137 ---- a/lib/tpm2_openssl.c
138 -+++ b/lib/tpm2_openssl.c
139 -@@ -14,7 +14,7 @@
140 - #include "tpm2_openssl.h"
141 -
142 - /* compatibility function for OpenSSL versions < 1.1.0 */
143 --#if OPENSSL_VERSION_NUMBER < 0x10100000L
144 -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
145 - static int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen) {
146 - int r;
147 - int topad;
148 ---
149 -2.24.1
150 -
151
152 diff --git a/app-crypt/tpm2-tools/tpm2-tools-3.1.4.ebuild b/app-crypt/tpm2-tools/tpm2-tools-3.1.4.ebuild
153 deleted file mode 100644
154 index 2e1a75c96bb..00000000000
155 --- a/app-crypt/tpm2-tools/tpm2-tools-3.1.4.ebuild
156 +++ /dev/null
157 @@ -1,32 +0,0 @@
158 -# Copyright 1999-2019 Gentoo Authors
159 -# Distributed under the terms of the GNU General Public License v2
160 -
161 -EAPI=7
162 -
163 -DESCRIPTION="Tools for the TPM 2.0 TSS"
164 -HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
165 -SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
166 -
167 -LICENSE="BSD"
168 -SLOT="0"
169 -KEYWORDS="~amd64"
170 -IUSE="libressl test"
171 -RESTRICT="!test? ( test )"
172 -
173 -RDEPEND=">=app-crypt/tpm2-tss-2.0:=
174 - net-misc/curl:=
175 - !libressl? ( dev-libs/openssl:0= )
176 - libressl? ( dev-libs/libressl:0= )"
177 -DEPEND="${RDEPEND}
178 - test? ( dev-util/cmocka )"
179 -BDEPEND="virtual/pkgconfig"
180 -
181 -PATCHES=(
182 - "${FILESDIR}/${PN}-3.1.3-libressl.patch"
183 -)
184 -
185 -src_configure() {
186 - econf \
187 - --disable-hardening \
188 - $(use_enable test unit)
189 -}
190
191 diff --git a/app-crypt/tpm2-tools/tpm2-tools-4.1.1.ebuild b/app-crypt/tpm2-tools/tpm2-tools-4.1.1.ebuild
192 deleted file mode 100644
193 index a2ad7f1f2dc..00000000000
194 --- a/app-crypt/tpm2-tools/tpm2-tools-4.1.1.ebuild
195 +++ /dev/null
196 @@ -1,32 +0,0 @@
197 -# Copyright 1999-2020 Gentoo Authors
198 -# Distributed under the terms of the GNU General Public License v2
199 -
200 -EAPI=7
201 -
202 -DESCRIPTION="Tools for the TPM 2.0 TSS"
203 -HOMEPAGE="https://github.com/tpm2-software/tpm2-tools"
204 -SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar.gz"
205 -
206 -LICENSE="BSD"
207 -SLOT="0"
208 -KEYWORDS="~amd64"
209 -IUSE="libressl test"
210 -RESTRICT="!test? ( test )"
211 -
212 -RDEPEND=">=app-crypt/tpm2-tss-2.3.1:=
213 - net-misc/curl:=
214 - !libressl? ( dev-libs/openssl:0= )
215 - libressl? ( dev-libs/libressl:0= )"
216 -DEPEND="${RDEPEND}
217 - test? ( dev-util/cmocka )"
218 -BDEPEND="virtual/pkgconfig"
219 -
220 -PATCHES=(
221 - "${FILESDIR}/${P}-libressl.patch"
222 -)
223 -
224 -src_configure() {
225 - econf \
226 - $(use_enable !libressl hardening) \
227 - $(use_enable test unit)
228 -}