1 |
commit: 6161432c4f5c51e4b9b04cb4a3ceaed6eb5d469a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 11 11:27:09 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 11 16:20:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6161432c |
7 |
|
8 |
sys-auth/yubico-piv-tool: Drop old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-auth/yubico-piv-tool/Manifest | 2 - |
13 |
.../files/yubico-piv-tool-1.5.0-openssl110.patch | 170 --------------------- |
14 |
.../yubico-piv-tool/yubico-piv-tool-1.4.4.ebuild | 29 ---- |
15 |
.../yubico-piv-tool/yubico-piv-tool-1.5.0.ebuild | 50 ------ |
16 |
4 files changed, 251 deletions(-) |
17 |
|
18 |
diff --git a/sys-auth/yubico-piv-tool/Manifest b/sys-auth/yubico-piv-tool/Manifest |
19 |
index 54e39443516..4b8764da767 100644 |
20 |
--- a/sys-auth/yubico-piv-tool/Manifest |
21 |
+++ b/sys-auth/yubico-piv-tool/Manifest |
22 |
@@ -1,3 +1 @@ |
23 |
-DIST yubico-piv-tool-1.4.4.tar.gz 109397 BLAKE2B ed1299508cd5f90c662a184527ae696e7cd463b0e8d327413c8acff47d41de7393570798b9582e845262afb1780e0c759246980051a62335d7033de913147bb9 SHA512 3edc341fdbeeacfbf541adc37d0bd2b1df9777ca04e13bc1825e99a151008213b816ff811e83e623f52eb1400a8146c36a5a874fc5e26a89c9398e79a0e234e1 |
24 |
-DIST yubico-piv-tool-1.5.0.tar.gz 179092 BLAKE2B d15eed89699989ff545f18cf54fd42349fc81862e7bb3e182fad59d0604cc9729dedcc4aaa40d3f28c1d40b78ddbb5ed073c107cb233d0fa66a17a2ef1e29d68 SHA512 10d7f7a2f163e5f61d6f7463f2124d06213506bff39f3fe0c5b361f90f8bc372de97ab1fa8d6bfcb77659f086d71f8ff536a064ee8f300a620b929ee76e8f8b9 |
25 |
DIST yubico-piv-tool-1.6.2.tar.gz 182957 BLAKE2B 0ca9bdcda68f7ee100078604854caccc5141ab01e40f894ae36c3175afa3989c1d0074ef0994e1e369d67499a9778e22f0c5a3cf930d1ba162b0ee0ddbc05f91 SHA512 fc72b9d381f10b63c8958b6c90c1ee97e3ef6b5fb283a9513e6f2ace972710c2872903f38350d9e4a3576b16cb0890b067dd55f5c125f443d353df3f628a9f96 |
26 |
|
27 |
diff --git a/sys-auth/yubico-piv-tool/files/yubico-piv-tool-1.5.0-openssl110.patch b/sys-auth/yubico-piv-tool/files/yubico-piv-tool-1.5.0-openssl110.patch |
28 |
deleted file mode 100644 |
29 |
index 86b8bf9bedc..00000000000 |
30 |
--- a/sys-auth/yubico-piv-tool/files/yubico-piv-tool-1.5.0-openssl110.patch |
31 |
+++ /dev/null |
32 |
@@ -1,170 +0,0 @@ |
33 |
-From c8372f27d791aa445e879ded4efe4a267e3ff48e Mon Sep 17 00:00:00 2001 |
34 |
-From: quentin <quentin@×××××××.io> |
35 |
-Date: Mon, 26 Feb 2018 02:43:41 +0100 |
36 |
-Subject: [PATCH] Improve compatibility with OpenSSL 1.1.0 |
37 |
- |
38 |
-* add missing headers |
39 |
-* stop using deprecated APIs |
40 |
---- |
41 |
- tool/util.c | 1 + |
42 |
- tool/yubico-piv-tool.c | 24 +++++++++++++++++++++++- |
43 |
- ykcs11/openssl_types.h | 1 + |
44 |
- ykcs11/openssl_utils.c | 11 +++++++++++ |
45 |
- 4 files changed, 36 insertions(+), 1 deletion(-) |
46 |
- |
47 |
-diff --git a/tool/util.c b/tool/util.c |
48 |
-index de6b071..5b299ca 100644 |
49 |
---- a/tool/util.c |
50 |
-+++ b/tool/util.c |
51 |
-@@ -38,6 +38,7 @@ |
52 |
- #endif |
53 |
- |
54 |
- #include "openssl-compat.h" |
55 |
-+#include <openssl/bn.h> |
56 |
- #include <openssl/evp.h> |
57 |
- #include <openssl/x509.h> |
58 |
- #include <openssl/rsa.h> |
59 |
-diff --git a/tool/yubico-piv-tool.c b/tool/yubico-piv-tool.c |
60 |
-index c40b027..f8b72b1 100644 |
61 |
---- a/tool/yubico-piv-tool.c |
62 |
-+++ b/tool/yubico-piv-tool.c |
63 |
-@@ -43,10 +43,12 @@ |
64 |
- #endif |
65 |
- |
66 |
- #include "openssl-compat.h" |
67 |
-+#include <openssl/bn.h> |
68 |
- #include <openssl/des.h> |
69 |
- #include <openssl/pem.h> |
70 |
- #include <openssl/pkcs12.h> |
71 |
- #include <openssl/rand.h> |
72 |
-+#include <openssl/rsa.h> |
73 |
- |
74 |
- #include "cmdline.h" |
75 |
- #include "util.h" |
76 |
-@@ -868,11 +870,19 @@ static bool selfsign_certificate(ykpiv_state *state, enum enum_key_format key_fo |
77 |
- fprintf(stderr, "Failed to set certificate serial.\n"); |
78 |
- goto selfsign_out; |
79 |
- } |
80 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
81 |
- if(!X509_gmtime_adj(X509_get_notBefore(x509), 0)) { |
82 |
-+#else |
83 |
-+ if(!X509_gmtime_adj(X509_getm_notBefore(x509), 0)) { |
84 |
-+#endif |
85 |
- fprintf(stderr, "Failed to set certificate notBefore.\n"); |
86 |
- goto selfsign_out; |
87 |
- } |
88 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
89 |
- if(!X509_gmtime_adj(X509_get_notAfter(x509), 60L * 60L * 24L * validDays)) { |
90 |
-+#else |
91 |
-+ if(!X509_gmtime_adj(X509_getm_notAfter(x509), 60L * 60L * 24L * validDays)) { |
92 |
-+#endif |
93 |
- fprintf(stderr, "Failed to set certificate notAfter.\n"); |
94 |
- goto selfsign_out; |
95 |
- } |
96 |
-@@ -1241,7 +1251,7 @@ static void print_cert_info(ykpiv_state *state, enum enum_slot slot, const EVP_M |
97 |
- |
98 |
- if(*ptr++ == 0x70) { |
99 |
- unsigned int md_len = sizeof(data); |
100 |
-- ASN1_TIME *not_before, *not_after; |
101 |
-+ const ASN1_TIME *not_before, *not_after; |
102 |
- |
103 |
- ptr += get_length(ptr, &cert_len); |
104 |
- x509 = X509_new(); |
105 |
-@@ -1299,13 +1309,21 @@ static void print_cert_info(ykpiv_state *state, enum enum_slot slot, const EVP_M |
106 |
- dump_data(data, md_len, output, false, format_arg_hex); |
107 |
- |
108 |
- bio = BIO_new_fp(output, BIO_NOCLOSE | BIO_FP_TEXT); |
109 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
110 |
- not_before = X509_get_notBefore(x509); |
111 |
-+#else |
112 |
-+ not_before = X509_get0_notBefore(x509); |
113 |
-+#endif |
114 |
- if(not_before) { |
115 |
- fprintf(output, "\tNot Before:\t"); |
116 |
- ASN1_TIME_print(bio, not_before); |
117 |
- fprintf(output, "\n"); |
118 |
- } |
119 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
120 |
- not_after = X509_get_notAfter(x509); |
121 |
-+#else |
122 |
-+ not_after = X509_get0_notAfter(x509); |
123 |
-+#endif |
124 |
- if(not_after) { |
125 |
- fprintf(output, "\tNot After:\t"); |
126 |
- ASN1_TIME_print(bio, not_after); |
127 |
-@@ -1950,7 +1968,9 @@ int main(int argc, char *argv[]) { |
128 |
- |
129 |
- |
130 |
- /* openssl setup.. */ |
131 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
132 |
- OpenSSL_add_all_algorithms(); |
133 |
-+#endif |
134 |
- |
135 |
- |
136 |
- for(i = 0; i < args_info.action_given; i++) { |
137 |
-@@ -2191,6 +2211,8 @@ int main(int argc, char *argv[]) { |
138 |
- } |
139 |
- |
140 |
- ykpiv_done(state); |
141 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
142 |
- EVP_cleanup(); |
143 |
-+#endif |
144 |
- return ret; |
145 |
- } |
146 |
-diff --git a/ykcs11/openssl_types.h b/ykcs11/openssl_types.h |
147 |
-index 307f746..08170fc 100644 |
148 |
---- a/ykcs11/openssl_types.h |
149 |
-+++ b/ykcs11/openssl_types.h |
150 |
-@@ -31,6 +31,7 @@ |
151 |
- #ifndef OPENSSL_TYPES_H |
152 |
- #define OPENSSL_TYPES_H |
153 |
- |
154 |
-+#include <openssl/bn.h> |
155 |
- #include <openssl/x509.h> |
156 |
- #include <openssl/evp.h> |
157 |
- #include <openssl/rsa.h> |
158 |
-diff --git a/ykcs11/openssl_utils.c b/ykcs11/openssl_utils.c |
159 |
-index 5a7f85d..edfe0ea 100644 |
160 |
---- a/ykcs11/openssl_utils.c |
161 |
-+++ b/ykcs11/openssl_utils.c |
162 |
-@@ -35,6 +35,11 @@ |
163 |
- #include "debug.h" |
164 |
- #include <string.h> |
165 |
- |
166 |
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L |
167 |
-+# define X509_set_notBefore X509_set1_notBefore |
168 |
-+# define X509_set_notAfter X509_set1_notAfter |
169 |
-+#endif |
170 |
-+ |
171 |
- CK_RV do_store_cert(CK_BYTE_PTR data, CK_ULONG len, X509 **cert) { |
172 |
- |
173 |
- const unsigned char *p = data; // Mandatory temp variable required by OpenSSL |
174 |
-@@ -580,7 +585,9 @@ CK_RV do_pkcs_pss(ykcs11_rsa_key_t *key, CK_BYTE_PTR in, CK_ULONG in_len, |
175 |
- int nid, CK_BYTE_PTR out, CK_ULONG_PTR out_len) { |
176 |
- unsigned char em[RSA_size(key)]; |
177 |
- |
178 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
179 |
- OpenSSL_add_all_digests(); |
180 |
-+#endif |
181 |
- |
182 |
- DBG("Apply PSS padding to %lu bytes and get %d", in_len, RSA_size(key)); |
183 |
- |
184 |
-@@ -590,14 +597,18 @@ CK_RV do_pkcs_pss(ykcs11_rsa_key_t *key, CK_BYTE_PTR in, CK_ULONG in_len, |
185 |
- |
186 |
- // In case of raw PSS (no hash) this function will fail because OpenSSL requires an MD |
187 |
- if (RSA_padding_add_PKCS1_PSS(key, em, out, EVP_get_digestbynid(nid), -2) == 0) { |
188 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
189 |
- EVP_cleanup(); |
190 |
-+#endif |
191 |
- return CKR_FUNCTION_FAILED; |
192 |
- } |
193 |
- |
194 |
- memcpy(out, em, sizeof(em)); |
195 |
- *out_len = (CK_ULONG) sizeof(em); |
196 |
- |
197 |
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L |
198 |
- EVP_cleanup(); |
199 |
-+#endif |
200 |
- |
201 |
- return CKR_OK; |
202 |
- } |
203 |
|
204 |
diff --git a/sys-auth/yubico-piv-tool/yubico-piv-tool-1.4.4.ebuild b/sys-auth/yubico-piv-tool/yubico-piv-tool-1.4.4.ebuild |
205 |
deleted file mode 100644 |
206 |
index 689eca071a9..00000000000 |
207 |
--- a/sys-auth/yubico-piv-tool/yubico-piv-tool-1.4.4.ebuild |
208 |
+++ /dev/null |
209 |
@@ -1,29 +0,0 @@ |
210 |
-# Copyright 1999-2017 Gentoo Foundation |
211 |
-# Distributed under the terms of the GNU General Public License v2 |
212 |
- |
213 |
-EAPI=6 |
214 |
- |
215 |
-inherit autotools |
216 |
- |
217 |
-DESCRIPTION="Command line tool for the YubiKey PIV application" |
218 |
-SRC_URI="https://github.com/Yubico/yubico-piv-tool/archive/yubico-piv-tool-${PV}.tar.gz" |
219 |
-HOMEPAGE="https://developers.yubico.com/yubico-piv-tool/ https://github.com/Yubico/yubico-piv-tool" |
220 |
- |
221 |
-LICENSE="BSD-2" |
222 |
-SLOT="0/1" |
223 |
-KEYWORDS="~amd64" |
224 |
-IUSE="" |
225 |
- |
226 |
-RDEPEND="dev-libs/openssl:0=[-bindist] |
227 |
- sys-apps/pcsc-lite" |
228 |
-DEPEND="dev-util/gengetopt |
229 |
- sys-apps/help2man |
230 |
- virtual/pkgconfig |
231 |
- ${RDEPEND}" |
232 |
- |
233 |
-S=${WORKDIR}/${PN}-${P} |
234 |
- |
235 |
-src_prepare() { |
236 |
- default |
237 |
- eautoreconf |
238 |
-} |
239 |
|
240 |
diff --git a/sys-auth/yubico-piv-tool/yubico-piv-tool-1.5.0.ebuild b/sys-auth/yubico-piv-tool/yubico-piv-tool-1.5.0.ebuild |
241 |
deleted file mode 100644 |
242 |
index 7a72c9087c3..00000000000 |
243 |
--- a/sys-auth/yubico-piv-tool/yubico-piv-tool-1.5.0.ebuild |
244 |
+++ /dev/null |
245 |
@@ -1,50 +0,0 @@ |
246 |
-# Copyright 1999-2018 Gentoo Foundation |
247 |
-# Distributed under the terms of the GNU General Public License v2 |
248 |
- |
249 |
-EAPI=6 |
250 |
- |
251 |
-inherit autotools |
252 |
- |
253 |
-DESCRIPTION="Command line tool for the YubiKey PIV application" |
254 |
-SRC_URI="https://github.com/Yubico/yubico-piv-tool/archive/yubico-piv-tool-${PV}.tar.gz" |
255 |
-HOMEPAGE="https://developers.yubico.com/yubico-piv-tool/ https://github.com/Yubico/yubico-piv-tool" |
256 |
- |
257 |
-LICENSE="BSD-2" |
258 |
-SLOT="0/1" |
259 |
-KEYWORDS="~amd64" |
260 |
-IUSE="test" |
261 |
- |
262 |
-RDEPEND=" |
263 |
- dev-libs/openssl:0=[-bindist] |
264 |
- sys-apps/pcsc-lite |
265 |
-" |
266 |
-DEPEND="${RDEPEND} |
267 |
- dev-util/gengetopt |
268 |
- sys-apps/help2man |
269 |
- virtual/pkgconfig |
270 |
- test? ( dev-libs/check ) |
271 |
-" |
272 |
- |
273 |
-S=${WORKDIR}/${PN}-${P} |
274 |
- |
275 |
-PATCHES=( "${FILESDIR}/${P}-openssl110.patch" ) |
276 |
- |
277 |
-src_prepare() { |
278 |
- default |
279 |
- |
280 |
- if ! use test; then |
281 |
- sed -i -e "/PKG_CHECK_MODULES(\[CHECK/d" configure.ac || die |
282 |
- sed -i -e "s/@CHECK_CFLAGS@//" -e "s/@CHECK_LIBS@//" */*/Makefile.am || die |
283 |
- fi |
284 |
- |
285 |
- eautoreconf |
286 |
-} |
287 |
- |
288 |
-src_configure() { |
289 |
- econf --disable-static |
290 |
-} |
291 |
- |
292 |
-src_install() { |
293 |
- default |
294 |
- rm "${D}"/usr/$(get_libdir)/*.la || die |
295 |
-} |