1 |
commit: 5af83b8575d6b469c6fac13d87c6e8d34c87da51 |
2 |
Author: orbea <orbea <AT> riseup <DOT> net> |
3 |
AuthorDate: Sat Jun 4 04:26:09 2022 +0000 |
4 |
Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> |
5 |
CommitDate: Sun Jun 5 01:45:35 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=5af83b85 |
7 |
|
8 |
app-crypt/qca: Updated for version 2.3.4 |
9 |
|
10 |
Signed-off-by: orbea <orbea <AT> riseup.net> |
11 |
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> |
12 |
|
13 |
app-crypt/qca/Manifest | 1 + |
14 |
app-crypt/qca/files/qca-2.3.4-libressl.patch | 103 +++++++++++++++++++++++++++ |
15 |
app-crypt/qca/metadata.xml | 45 ++++++------ |
16 |
app-crypt/qca/qca-2.3.4.ebuild | 85 ++++++++++++++++++++++ |
17 |
4 files changed, 211 insertions(+), 23 deletions(-) |
18 |
|
19 |
diff --git a/app-crypt/qca/Manifest b/app-crypt/qca/Manifest |
20 |
index df985ae..a5a57d8 100644 |
21 |
--- a/app-crypt/qca/Manifest |
22 |
+++ b/app-crypt/qca/Manifest |
23 |
@@ -1,2 +1,3 @@ |
24 |
DIST qca-2.3.0.tar.xz 729504 BLAKE2B 71cf9dfae00066c14e1055da1fa1a8e1210f538b1addfde1b99a9b26b1e8f7dd61e289d0f505b5ec04d5f4745216d4fd0f8be8f8de9e9cbf74123907ba703d0e SHA512 ca9251868e073834562fa62ffc64b3e7817c9ddadc6bc3fb99cf8b5c8d859969562170a98874be9590c617b2dd8e5590d2c83792554f54bb880c677902db22fe |
25 |
DIST qca-2.3.1.tar.xz 725984 BLAKE2B a99121dd95822ef5e1057dc9ad9250bb14486f42b0571936453644bc7c5649f16cbc918fa04d4a5af2c62bc35cc672159a84e27a86e685cfe320518a42076052 SHA512 092704a8d7c5973f05c82584ea55b4f8f874965aea943277e50fde873913a9bdad6a51ea74fc0036bbb632a13141cb4c030504229c06779890286205929f6021 |
26 |
+DIST qca-2.3.4.tar.xz 737072 BLAKE2B 64e698135f02bf115269203d44a53d40449be1620487340551c1e45f66f042132beb2cfa2363d1249f92de3ffd670f1807219cb3ce3d6e7c05afd8c22242b703 SHA512 af27338b5c018d39c8c745b63691dec3914e29ff79347ab338f4391ee1dc9832d158b222bc9ef6c7681cf4b2893a38829a4daadf1d53622d6947de2efeb880a8 |
27 |
|
28 |
diff --git a/app-crypt/qca/files/qca-2.3.4-libressl.patch b/app-crypt/qca/files/qca-2.3.4-libressl.patch |
29 |
new file mode 100644 |
30 |
index 0000000..8bee8ad |
31 |
--- /dev/null |
32 |
+++ b/app-crypt/qca/files/qca-2.3.4-libressl.patch |
33 |
@@ -0,0 +1,103 @@ |
34 |
+From aa07e1eacdbfeefa5ff21c5d7e45ce9e02e91dbb Mon Sep 17 00:00:00 2001 |
35 |
+From: Stefan Strogin <steils@g.o> |
36 |
+Date: Fri, 3 Jun 2022 21:11:45 -0700 |
37 |
+Subject: [PATCH] LibreSSL 3.0.x support |
38 |
+ |
39 |
+--- |
40 |
+ plugins/qca-ossl/qca-ossl.cpp | 25 ++++++++++++++++++++++++- |
41 |
+ 1 file changed, 24 insertions(+), 1 deletion(-) |
42 |
+ |
43 |
+diff --git a/plugins/qca-ossl/qca-ossl.cpp b/plugins/qca-ossl/qca-ossl.cpp |
44 |
+index b2c5d3d..79775cd 100644 |
45 |
+--- a/plugins/qca-ossl/qca-ossl.cpp |
46 |
++++ b/plugins/qca-ossl/qca-ossl.cpp |
47 |
+@@ -44,7 +44,13 @@ |
48 |
+ #include <openssl/provider.h> |
49 |
+ #endif |
50 |
+ |
51 |
++#ifndef RSA_F_RSA_OSSL_PRIVATE_DECRYPT |
52 |
++#define RSA_F_RSA_OSSL_PRIVATE_DECRYPT RSA_F_RSA_EAY_PRIVATE_DECRYPT |
53 |
++#endif |
54 |
++ |
55 |
++#ifndef LIBRESSL_VERSION_NUMBER |
56 |
+ #include <openssl/kdf.h> |
57 |
++#endif |
58 |
+ |
59 |
+ using namespace QCA; |
60 |
+ |
61 |
+@@ -1254,6 +1260,7 @@ public: |
62 |
+ protected: |
63 |
+ }; |
64 |
+ |
65 |
++#ifndef LIBRESSL_VERSION_NUMBER |
66 |
+ class opensslHkdfContext : public HKDFContext |
67 |
+ { |
68 |
+ Q_OBJECT |
69 |
+@@ -1286,6 +1293,7 @@ public: |
70 |
+ return out; |
71 |
+ } |
72 |
+ }; |
73 |
++#endif // LIBRESSL_VERSION_NUMBER |
74 |
+ |
75 |
+ class opensslHMACContext : public MACContext |
76 |
+ { |
77 |
+@@ -4993,7 +5001,11 @@ public: |
78 |
+ case TLS::TLS_v1: |
79 |
+ ctx = SSL_CTX_new(TLS_client_method()); |
80 |
+ SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION); |
81 |
++#ifdef TLS1_3_VERSION |
82 |
+ SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION); |
83 |
++#else |
84 |
++ SSL_CTX_set_max_proto_version(ctx, TLS1_2_VERSION); |
85 |
++#endif |
86 |
+ break; |
87 |
+ case TLS::DTLS_v1: |
88 |
+ default: |
89 |
+@@ -5014,7 +5026,11 @@ public: |
90 |
+ QStringList cipherList; |
91 |
+ for (int i = 0; i < sk_SSL_CIPHER_num(sk); ++i) { |
92 |
+ const SSL_CIPHER *thisCipher = sk_SSL_CIPHER_value(sk, i); |
93 |
++#ifndef LIBRESSL_VERSION_NUMBER |
94 |
+ cipherList += QString::fromLatin1(SSL_CIPHER_standard_name(thisCipher)); |
95 |
++#else |
96 |
++ cipherList += QString::fromLatin1(SSL_CIPHER_get_name(thisCipher)); |
97 |
++#endif |
98 |
+ } |
99 |
+ sk_SSL_CIPHER_free(sk); |
100 |
+ |
101 |
+@@ -5386,8 +5402,11 @@ public: |
102 |
+ qDebug("unexpected version response"); |
103 |
+ sessInfo.version = TLS::TLS_v1; |
104 |
+ } |
105 |
+- |
106 |
++#ifndef LIBRESSL_VERSION_NUMBER |
107 |
+ sessInfo.cipherSuite = QString::fromLatin1(SSL_CIPHER_standard_name(SSL_get_current_cipher(ssl))); |
108 |
++#else |
109 |
++ sessInfo.cipherSuite = QString::fromLatin1(SSL_CIPHER_get_name(SSL_get_current_cipher(ssl))); |
110 |
++#endif |
111 |
+ |
112 |
+ sessInfo.cipherMaxBits = SSL_get_cipher_bits(ssl, &(sessInfo.cipherBits)); |
113 |
+ |
114 |
+@@ -6687,7 +6706,9 @@ public: |
115 |
+ #endif |
116 |
+ list += QStringLiteral("pbkdf1(sha1)"); |
117 |
+ list += QStringLiteral("pbkdf2(sha1)"); |
118 |
++#ifndef LIBRESSL_VERSION_NUMBER |
119 |
+ list += QStringLiteral("hkdf(sha256)"); |
120 |
++#endif // LIBRESSL_VERSION_NUMBER |
121 |
+ list += QStringLiteral("pkey"); |
122 |
+ list += QStringLiteral("dlgroup"); |
123 |
+ list += QStringLiteral("rsa"); |
124 |
+@@ -6756,8 +6777,10 @@ public: |
125 |
+ #endif |
126 |
+ else if (type == QLatin1String("pbkdf2(sha1)")) |
127 |
+ return new opensslPbkdf2Context(this, type); |
128 |
++#ifndef LIBRESSL_VERSION_NUMBER |
129 |
+ else if (type == QLatin1String("hkdf(sha256)")) |
130 |
+ return new opensslHkdfContext(this, type); |
131 |
++#endif // LIBRESSL_VERSION_NUMBER |
132 |
+ else if (type == QLatin1String("hmac(md5)")) |
133 |
+ return new opensslHMACContext(EVP_md5(), this, type); |
134 |
+ else if (type == QLatin1String("hmac(sha1)")) |
135 |
+-- |
136 |
+2.35.1 |
137 |
|
138 |
diff --git a/app-crypt/qca/metadata.xml b/app-crypt/qca/metadata.xml |
139 |
index dff1320..c8d4880 100644 |
140 |
--- a/app-crypt/qca/metadata.xml |
141 |
+++ b/app-crypt/qca/metadata.xml |
142 |
@@ -1,26 +1,25 @@ |
143 |
<?xml version="1.0" encoding="UTF-8"?> |
144 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
145 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
146 |
<pkgmetadata> |
147 |
-<maintainer type="project"> |
148 |
- <email>crypto@g.o</email> |
149 |
- <name>Crypto</name> |
150 |
-</maintainer> |
151 |
-<maintainer type="project"> |
152 |
- <email>qt@g.o</email> |
153 |
- <name>Gentoo Qt Project</name> |
154 |
-</maintainer> |
155 |
-<maintainer type="project"> |
156 |
- <email>kde@g.o</email> |
157 |
- <name>Gentoo KDE Project</name> |
158 |
-</maintainer> |
159 |
-<use> |
160 |
- <flag name="botan">Enable botan plugin</flag> |
161 |
- <flag name="gcrypt">Enable gcrypt plugin</flag> |
162 |
- <flag name="gpg">Enable GnuPG plugin</flag> |
163 |
- <flag name="logger">Enable logger plugin</flag> |
164 |
- <flag name="nss">Enable NSS plugin</flag> |
165 |
- <flag name="pkcs11">Enable PKCS#11 plugin</flag> |
166 |
- <flag name="sasl">Enable SASL plugin</flag> |
167 |
- <flag name="softstore">Enable softstore plugin</flag> |
168 |
-</use> |
169 |
+ <maintainer type="project"> |
170 |
+ <email>qt@g.o</email> |
171 |
+ <name>Gentoo Qt Project</name> |
172 |
+ </maintainer> |
173 |
+ <maintainer type="project"> |
174 |
+ <email>kde@g.o</email> |
175 |
+ <name>Gentoo KDE Project</name> |
176 |
+ </maintainer> |
177 |
+ <upstream> |
178 |
+ <bugs-to>https://bugs.kde.org/</bugs-to> |
179 |
+ </upstream> |
180 |
+ <use> |
181 |
+ <flag name="botan">Enable botan plugin</flag> |
182 |
+ <flag name="gcrypt">Enable gcrypt plugin</flag> |
183 |
+ <flag name="gpg">Enable GnuPG plugin</flag> |
184 |
+ <flag name="logger">Enable logger plugin</flag> |
185 |
+ <flag name="nss">Enable NSS plugin</flag> |
186 |
+ <flag name="pkcs11">Enable PKCS#11 plugin</flag> |
187 |
+ <flag name="sasl">Enable SASL plugin</flag> |
188 |
+ <flag name="softstore">Enable softstore plugin</flag> |
189 |
+ </use> |
190 |
</pkgmetadata> |
191 |
|
192 |
diff --git a/app-crypt/qca/qca-2.3.4.ebuild b/app-crypt/qca/qca-2.3.4.ebuild |
193 |
new file mode 100644 |
194 |
index 0000000..32e9394 |
195 |
--- /dev/null |
196 |
+++ b/app-crypt/qca/qca-2.3.4.ebuild |
197 |
@@ -0,0 +1,85 @@ |
198 |
+# Copyright 1999-2021 Gentoo Authors |
199 |
+# Distributed under the terms of the GNU General Public License v2 |
200 |
+ |
201 |
+EAPI=8 |
202 |
+ |
203 |
+inherit cmake kde.org qmake-utils |
204 |
+ |
205 |
+DESCRIPTION="Qt Cryptographic Architecture (QCA)" |
206 |
+HOMEPAGE="https://userbase.kde.org/QCA" |
207 |
+SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz" |
208 |
+ |
209 |
+LICENSE="LGPL-2.1" |
210 |
+SLOT="2" |
211 |
+KEYWORDS="amd64 ~arm arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris" |
212 |
+IUSE="botan debug doc examples gcrypt gpg logger nss pkcs11 sasl softstore +ssl test" |
213 |
+ |
214 |
+RESTRICT="!test? ( test )" |
215 |
+ |
216 |
+RDEPEND=" |
217 |
+ >=dev-qt/qtcore-5.14:5 |
218 |
+ botan? ( dev-libs/botan:= ) |
219 |
+ gcrypt? ( dev-libs/libgcrypt:= ) |
220 |
+ gpg? ( app-crypt/gnupg ) |
221 |
+ nss? ( dev-libs/nss ) |
222 |
+ pkcs11? ( |
223 |
+ >=dev-libs/openssl-1.1 |
224 |
+ dev-libs/pkcs11-helper |
225 |
+ ) |
226 |
+ sasl? ( dev-libs/cyrus-sasl:2 ) |
227 |
+ ssl? ( >=dev-libs/openssl-1.1:= ) |
228 |
+" |
229 |
+DEPEND="${RDEPEND} |
230 |
+ test? ( |
231 |
+ dev-qt/qtnetwork:5 |
232 |
+ dev-qt/qttest:5 |
233 |
+ ) |
234 |
+" |
235 |
+BDEPEND="doc? ( app-doc/doxygen )" |
236 |
+ |
237 |
+PATCHES=( |
238 |
+ "${FILESDIR}/${PN}-disable-pgp-test.patch" |
239 |
+ "${FILESDIR}/${P}-libressl.patch" |
240 |
+) |
241 |
+ |
242 |
+qca_plugin_use() { |
243 |
+ echo -DWITH_${2:-$1}_PLUGIN=$(usex "$1") |
244 |
+} |
245 |
+ |
246 |
+src_configure() { |
247 |
+ local mycmakeargs=( |
248 |
+ -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}$(qt5_get_mkspecsdir)/features" |
249 |
+ -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}$(qt5_get_plugindir)" |
250 |
+ $(qca_plugin_use botan) |
251 |
+ $(qca_plugin_use gcrypt) |
252 |
+ $(qca_plugin_use gpg gnupg) |
253 |
+ $(qca_plugin_use logger) |
254 |
+ $(qca_plugin_use nss) |
255 |
+ $(qca_plugin_use pkcs11) |
256 |
+ $(qca_plugin_use sasl cyrus-sasl) |
257 |
+ $(qca_plugin_use softstore) |
258 |
+ $(qca_plugin_use ssl ossl) |
259 |
+ -DBUILD_TESTS=$(usex test) |
260 |
+ ) |
261 |
+ cmake_src_configure |
262 |
+} |
263 |
+ |
264 |
+src_test() { |
265 |
+ local -x QCA_PLUGIN_PATH="${BUILD_DIR}/lib/qca" |
266 |
+ cmake_src_test |
267 |
+} |
268 |
+ |
269 |
+src_install() { |
270 |
+ cmake_src_install |
271 |
+ |
272 |
+ if use doc; then |
273 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
274 |
+ doxygen Doxyfile || die |
275 |
+ dodoc -r apidocs/html |
276 |
+ popd >/dev/null || die |
277 |
+ fi |
278 |
+ |
279 |
+ if use examples; then |
280 |
+ dodoc -r "${S}"/examples |
281 |
+ fi |
282 |
+} |