1 |
commit: 211b332e9782f51eb53c57dc9fa5ed00ca816d31 |
2 |
Author: orbea <orbea <AT> riseup <DOT> net> |
3 |
AuthorDate: Tue Jul 5 01:51:13 2022 +0000 |
4 |
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> |
5 |
CommitDate: Tue Jul 5 21:18:31 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=211b332e |
7 |
|
8 |
app-crypt/tpm-tools: Remove package |
9 |
|
10 |
Works with libressl-3.5.x and tpm-tools-1.3.9.2::gentoo. |
11 |
|
12 |
Signed-off-by: orbea <orbea <AT> riseup.net> |
13 |
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> |
14 |
|
15 |
app-crypt/tpm-tools/Manifest | 1 - |
16 |
.../files/tpm-tools-1.3.9.1-openssl-1.1.patch | 241 --------------------- |
17 |
app-crypt/tpm-tools/metadata.xml | 21 -- |
18 |
app-crypt/tpm-tools/tpm-tools-1.3.9.1-r1.ebuild | 50 ----- |
19 |
4 files changed, 313 deletions(-) |
20 |
|
21 |
diff --git a/app-crypt/tpm-tools/Manifest b/app-crypt/tpm-tools/Manifest |
22 |
deleted file mode 100644 |
23 |
index 4d121ec..0000000 |
24 |
--- a/app-crypt/tpm-tools/Manifest |
25 |
+++ /dev/null |
26 |
@@ -1 +0,0 @@ |
27 |
-DIST tpm-tools-1.3.9.1.tar.gz 482859 BLAKE2B ee915679e23bead04672bf719ce59bb6f20b550be39855b5304caeff554bf54d3cfe9104d464af7762388995e51d2bed0f9bedad83e42146cb7457382d09f4b2 SHA512 63a9c0e761cd890cc0a218de79a9c0169e151aba7824c19bf6b7ec894cf41c4950de1f63bd849aa93a4bdff36cf0fe557bc17113912b6d77f57f2bf1190b6a08 |
28 |
|
29 |
diff --git a/app-crypt/tpm-tools/files/tpm-tools-1.3.9.1-openssl-1.1.patch b/app-crypt/tpm-tools/files/tpm-tools-1.3.9.1-openssl-1.1.patch |
30 |
deleted file mode 100644 |
31 |
index a5747db..0000000 |
32 |
--- a/app-crypt/tpm-tools/files/tpm-tools-1.3.9.1-openssl-1.1.patch |
33 |
+++ /dev/null |
34 |
@@ -1,241 +0,0 @@ |
35 |
-From 31d9cebc43833de939a0e13be0110ed830b66cbd Mon Sep 17 00:00:00 2001 |
36 |
-From: Alon Bar-Lev <alon.barlev@×××××.com> |
37 |
-Date: Sat, 8 Dec 2018 23:28:54 +0200 |
38 |
-Subject: [PATCH] data_import.c: support openssl-1.1 |
39 |
- |
40 |
-Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
41 |
-Bug: https://sourceforge.net/p/trousers/bugs/227/ |
42 |
---- |
43 |
- src/data_mgmt/data_import.c | 159 +++++++++++++++++++++++++----------- |
44 |
- 1 file changed, 112 insertions(+), 47 deletions(-) |
45 |
- |
46 |
-diff --git a/src/data_mgmt/data_import.c b/src/data_mgmt/data_import.c |
47 |
-index f534717..33c76e7 100644 |
48 |
---- a/src/data_mgmt/data_import.c |
49 |
-+++ b/src/data_mgmt/data_import.c |
50 |
-@@ -39,6 +39,30 @@ |
51 |
- #include <openssl/evp.h> |
52 |
- #include <openssl/err.h> |
53 |
- |
54 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) |
55 |
-+static void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) { |
56 |
-+ if ( n ) |
57 |
-+ *n = r->n; |
58 |
-+ if ( e ) |
59 |
-+ *e = r->e; |
60 |
-+ if ( d ) |
61 |
-+ *d = r->d; |
62 |
-+} |
63 |
-+static void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) { |
64 |
-+ if ( p ) |
65 |
-+ *p = r->p; |
66 |
-+ if ( q ) |
67 |
-+ *q = r->q; |
68 |
-+} |
69 |
-+static void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, const BIGNUM **iqmp) { |
70 |
-+ if ( dmp1 ) |
71 |
-+ *dmp1 = r->dmp1; |
72 |
-+ if ( dmq1 ) |
73 |
-+ *dmq1 = r->dmq1; |
74 |
-+ if ( iqmp ) |
75 |
-+ *iqmp = r->iqmp; |
76 |
-+} |
77 |
-+#endif |
78 |
- |
79 |
- /* |
80 |
- * Global variables |
81 |
-@@ -372,7 +396,7 @@ readX509Cert( const char *a_pszFile, |
82 |
- goto out; |
83 |
- } |
84 |
- |
85 |
-- if ( EVP_PKEY_type( pKey->type ) != EVP_PKEY_RSA ) { |
86 |
-+ if ( EVP_PKEY_base_id( pKey ) != EVP_PKEY_RSA ) { |
87 |
- logError( TOKEN_RSA_KEY_ERROR ); |
88 |
- |
89 |
- X509_free( pX509 ); |
90 |
-@@ -691,17 +715,35 @@ createRsaPubKeyObject( RSA *a_pRsa, |
91 |
- |
92 |
- int rc = -1; |
93 |
- |
94 |
-- int nLen = BN_num_bytes( a_pRsa->n ); |
95 |
-- int eLen = BN_num_bytes( a_pRsa->e ); |
96 |
-+ const BIGNUM *bn; |
97 |
-+ const BIGNUM *be; |
98 |
-+ int nLen; |
99 |
-+ int eLen; |
100 |
-+ CK_BYTE *n = NULL; |
101 |
-+ CK_BYTE *e = NULL; |
102 |
-+ |
103 |
-+ RSA_get0_key( a_pRsa, &bn, &be, NULL ); |
104 |
-+ |
105 |
-+ nLen = BN_num_bytes( bn ); |
106 |
-+ eLen = BN_num_bytes( be ); |
107 |
-+ n = malloc( nLen ); |
108 |
-+ e = malloc( eLen ); |
109 |
-+ |
110 |
-+ if ( !n || !e ) { |
111 |
-+ logError( TOKEN_MEMORY_ERROR ); |
112 |
-+ goto out; |
113 |
-+ } |
114 |
-+ |
115 |
-+ // Get binary representations of the RSA key information |
116 |
-+ BN_bn2bin( bn, n ); |
117 |
-+ BN_bn2bin( be, e ); |
118 |
- |
119 |
-+ { |
120 |
- CK_RV rv; |
121 |
- |
122 |
- CK_BBOOL bTrue = TRUE; |
123 |
- CK_BBOOL bFalse = FALSE; |
124 |
- |
125 |
-- CK_BYTE *n = malloc( nLen ); |
126 |
-- CK_BYTE *e = malloc( eLen ); |
127 |
-- |
128 |
- CK_OBJECT_CLASS clPubClass = CKO_PUBLIC_KEY; |
129 |
- CK_KEY_TYPE tKeyType = CKK_RSA; |
130 |
- CK_BBOOL bPrivate = ( !g_bPublic ) ? TRUE : FALSE; |
131 |
-@@ -726,21 +768,13 @@ createRsaPubKeyObject( RSA *a_pRsa, |
132 |
- |
133 |
- *a_hObject = 0; |
134 |
- |
135 |
-- if ( !n || !e ) { |
136 |
-- logError( TOKEN_MEMORY_ERROR ); |
137 |
-- goto out; |
138 |
-- } |
139 |
-- |
140 |
-- // Get binary representations of the RSA key information |
141 |
-- BN_bn2bin( a_pRsa->n, n ); |
142 |
-- BN_bn2bin( a_pRsa->e, e ); |
143 |
-- |
144 |
- // Create the RSA public key object |
145 |
- rv = createObject( a_hSession, tAttr, ulAttrCount, a_hObject ); |
146 |
- if ( rv != CKR_OK ) |
147 |
- goto out; |
148 |
- |
149 |
- rc = 0; |
150 |
-+ } |
151 |
- |
152 |
- out: |
153 |
- free( n ); |
154 |
-@@ -760,29 +794,74 @@ createRsaPrivKeyObject( RSA *a_pRsa, |
155 |
- |
156 |
- int rc = -1; |
157 |
- |
158 |
-- int nLen = BN_num_bytes( a_pRsa->n ); |
159 |
-- int eLen = BN_num_bytes( a_pRsa->e ); |
160 |
-- int dLen = BN_num_bytes( a_pRsa->d ); |
161 |
-- int pLen = BN_num_bytes( a_pRsa->p ); |
162 |
-- int qLen = BN_num_bytes( a_pRsa->q ); |
163 |
-- int dmp1Len = BN_num_bytes( a_pRsa->dmp1 ); |
164 |
-- int dmq1Len = BN_num_bytes( a_pRsa->dmq1 ); |
165 |
-- int iqmpLen = BN_num_bytes( a_pRsa->iqmp ); |
166 |
-+ const BIGNUM *bn; |
167 |
-+ const BIGNUM *be; |
168 |
-+ const BIGNUM *bd; |
169 |
-+ const BIGNUM *bp; |
170 |
-+ const BIGNUM *bq; |
171 |
-+ const BIGNUM *bdmp1; |
172 |
-+ const BIGNUM *bdmq1; |
173 |
-+ const BIGNUM *biqmp; |
174 |
-+ int nLen; |
175 |
-+ int eLen; |
176 |
-+ int dLen; |
177 |
-+ int pLen; |
178 |
-+ int qLen; |
179 |
-+ int dmp1Len; |
180 |
-+ int dmq1Len; |
181 |
-+ int iqmpLen; |
182 |
-+ CK_BYTE *n = NULL; |
183 |
-+ CK_BYTE *e = NULL; |
184 |
-+ CK_BYTE *d = NULL; |
185 |
-+ CK_BYTE *p = NULL; |
186 |
-+ CK_BYTE *q = NULL; |
187 |
-+ CK_BYTE *dmp1 = NULL; |
188 |
-+ CK_BYTE *dmq1 = NULL; |
189 |
-+ CK_BYTE *iqmp = NULL; |
190 |
-+ |
191 |
-+ RSA_get0_key( a_pRsa, &bn, &be, &bd); |
192 |
-+ RSA_get0_factors( a_pRsa, &bp, &bq); |
193 |
-+ RSA_get0_crt_params( a_pRsa, &bdmp1, &bdmq1, &biqmp ); |
194 |
-+ |
195 |
-+ nLen = BN_num_bytes( bn ); |
196 |
-+ eLen = BN_num_bytes( be ); |
197 |
-+ dLen = BN_num_bytes( bd ); |
198 |
-+ pLen = BN_num_bytes( bp ); |
199 |
-+ qLen = BN_num_bytes( bq ); |
200 |
-+ dmp1Len = BN_num_bytes( bdmp1 ); |
201 |
-+ dmq1Len = BN_num_bytes( bdmq1 ); |
202 |
-+ iqmpLen = BN_num_bytes( biqmp ); |
203 |
-+ |
204 |
-+ n = malloc( nLen ); |
205 |
-+ e = malloc( eLen ); |
206 |
-+ d = malloc( dLen ); |
207 |
-+ p = malloc( pLen ); |
208 |
-+ q = malloc( qLen ); |
209 |
-+ dmp1 = malloc( dmp1Len ); |
210 |
-+ dmq1 = malloc( dmq1Len ); |
211 |
-+ iqmp = malloc( iqmpLen ); |
212 |
- |
213 |
-+ if ( !n || !e || !d || !p || !q || !dmp1 || !dmq1 || !iqmp ) { |
214 |
-+ logError( TOKEN_MEMORY_ERROR ); |
215 |
-+ goto out; |
216 |
-+ } |
217 |
-+ |
218 |
-+ // Get binary representations of the RSA key information |
219 |
-+ BN_bn2bin( bn, n ); |
220 |
-+ BN_bn2bin( be, e ); |
221 |
-+ BN_bn2bin( bd, d ); |
222 |
-+ BN_bn2bin( bp, p ); |
223 |
-+ BN_bn2bin( bq, q ); |
224 |
-+ BN_bn2bin( bdmp1, dmp1 ); |
225 |
-+ BN_bn2bin( bdmq1, dmq1 ); |
226 |
-+ BN_bn2bin( biqmp, iqmp ); |
227 |
-+ |
228 |
-+ { |
229 |
- CK_RV rv; |
230 |
- |
231 |
- CK_BBOOL bTrue = TRUE; |
232 |
- CK_BBOOL bFalse = FALSE; |
233 |
- |
234 |
-- CK_BYTE *n = malloc( nLen ); |
235 |
-- CK_BYTE *e = malloc( eLen ); |
236 |
-- CK_BYTE *d = malloc( dLen ); |
237 |
-- CK_BYTE *p = malloc( pLen ); |
238 |
-- CK_BYTE *q = malloc( qLen ); |
239 |
-- CK_BYTE *dmp1 = malloc( dmp1Len ); |
240 |
-- CK_BYTE *dmq1 = malloc( dmq1Len ); |
241 |
-- CK_BYTE *iqmp = malloc( iqmpLen ); |
242 |
-- |
243 |
- CK_OBJECT_CLASS clPrivClass = CKO_PRIVATE_KEY; |
244 |
- CK_KEY_TYPE tKeyType = CKK_RSA; |
245 |
- CK_BBOOL bPrivate = ( !g_bPublic ) ? TRUE : FALSE; |
246 |
-@@ -815,25 +894,11 @@ createRsaPrivKeyObject( RSA *a_pRsa, |
247 |
- |
248 |
- *a_hObject = 0; |
249 |
- |
250 |
-- if ( !n || !e || !d || !p || !q || !dmp1 || !dmq1 || !iqmp ) { |
251 |
-- logError( TOKEN_MEMORY_ERROR ); |
252 |
-- goto out; |
253 |
-- } |
254 |
-- |
255 |
-- // Get binary representations of the RSA key information |
256 |
-- BN_bn2bin( a_pRsa->n, n ); |
257 |
-- BN_bn2bin( a_pRsa->e, e ); |
258 |
-- BN_bn2bin( a_pRsa->d, d ); |
259 |
-- BN_bn2bin( a_pRsa->p, p ); |
260 |
-- BN_bn2bin( a_pRsa->q, q ); |
261 |
-- BN_bn2bin( a_pRsa->dmp1, dmp1 ); |
262 |
-- BN_bn2bin( a_pRsa->dmq1, dmq1 ); |
263 |
-- BN_bn2bin( a_pRsa->iqmp, iqmp ); |
264 |
-- |
265 |
- // Create the RSA private key object |
266 |
- rv = createObject( a_hSession, tAttr, ulAttrCount, a_hObject ); |
267 |
- if ( rv != CKR_OK ) |
268 |
- goto out; |
269 |
-+ } |
270 |
- |
271 |
- rc = 0; |
272 |
- |
273 |
--- |
274 |
-2.19.2 |
275 |
- |
276 |
|
277 |
diff --git a/app-crypt/tpm-tools/metadata.xml b/app-crypt/tpm-tools/metadata.xml |
278 |
deleted file mode 100644 |
279 |
index d008406..0000000 |
280 |
--- a/app-crypt/tpm-tools/metadata.xml |
281 |
+++ /dev/null |
282 |
@@ -1,21 +0,0 @@ |
283 |
-<?xml version="1.0" encoding="UTF-8"?> |
284 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
285 |
-<pkgmetadata> |
286 |
- <maintainer type="person"> |
287 |
- <email>salah.coronya@×××××.com</email> |
288 |
- <name>Salah Coronya</name> |
289 |
- </maintainer> |
290 |
- <maintainer type="project"> |
291 |
- <email>proxy-maint@g.o</email> |
292 |
- <name>Proxy Maintainers</name> |
293 |
- </maintainer> |
294 |
- <use> |
295 |
- <flag name="pkcs11"> |
296 |
- Build Token data management utilities based on OpenCryptoki's |
297 |
- (<pkg>dev-libs/opencryptoki</pkg>) PKCS#11 implementation. |
298 |
- </flag> |
299 |
- </use> |
300 |
- <upstream> |
301 |
- <remote-id type="sourceforge">trousers</remote-id> |
302 |
- </upstream> |
303 |
-</pkgmetadata> |
304 |
|
305 |
diff --git a/app-crypt/tpm-tools/tpm-tools-1.3.9.1-r1.ebuild b/app-crypt/tpm-tools/tpm-tools-1.3.9.1-r1.ebuild |
306 |
deleted file mode 100644 |
307 |
index 2f87a05..0000000 |
308 |
--- a/app-crypt/tpm-tools/tpm-tools-1.3.9.1-r1.ebuild |
309 |
+++ /dev/null |
310 |
@@ -1,50 +0,0 @@ |
311 |
-# Copyright 1999-2021 Gentoo Authors |
312 |
-# Distributed under the terms of the GNU General Public License v2 |
313 |
- |
314 |
-EAPI=7 |
315 |
- |
316 |
-inherit autotools flag-o-matic |
317 |
- |
318 |
-DESCRIPTION="TrouSerS' support tools for the Trusted Platform Modules" |
319 |
-HOMEPAGE="http://trousers.sourceforge.net" |
320 |
-SRC_URI="mirror://sourceforge/trousers/${PN}/${P}.tar.gz" |
321 |
- |
322 |
-LICENSE="CPL-1.0" |
323 |
-SLOT="0" |
324 |
-KEYWORDS="amd64 ~arm arm64 ~m68k ~s390 x86" |
325 |
-IUSE="nls pkcs11 debug" |
326 |
- |
327 |
-DEPEND=">=app-crypt/trousers-0.3.0 |
328 |
- dev-libs/openssl:0= |
329 |
- pkcs11? ( dev-libs/opencryptoki )" |
330 |
-RDEPEND="${DEPEND}" |
331 |
-BDEPEND="nls? ( sys-devel/gettext )" |
332 |
- |
333 |
-S="${WORKDIR}" |
334 |
- |
335 |
-PATCHES=( |
336 |
- "${FILESDIR}/${P}-openssl-1.1.patch" |
337 |
-) |
338 |
- |
339 |
-src_prepare() { |
340 |
- default |
341 |
- |
342 |
- sed -i -r \ |
343 |
- -e '/CFLAGS/s/ -m64//' \ |
344 |
- configure.ac || die |
345 |
- |
346 |
- eautoreconf |
347 |
-} |
348 |
- |
349 |
-src_configure() { |
350 |
- append-cppflags $(usex debug -DDEBUG -DNDEBUG) |
351 |
- |
352 |
- econf \ |
353 |
- $(use_enable nls) \ |
354 |
- $(use pkcs11 || echo --disable-pkcs11-support) |
355 |
-} |
356 |
- |
357 |
-src_install() { |
358 |
- default |
359 |
- find "${D}" -name '*.la' -delete || die |
360 |
-} |