Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/gnupg/files/, app-crypt/gnupg/
Date: Tue, 01 Sep 2020 09:41:50
Message-Id: 1598953307.eecfafdf8668a17309be1b1e5441b489c310e33a.zlogene@gentoo
1 commit: eecfafdf8668a17309be1b1e5441b489c310e33a
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 1 09:40:50 2020 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 1 09:41:47 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eecfafdf
7
8 app-crypt/gnupg: fix smart card autodetection
9
10 Closes: https://bugs.gentoo.org/739630q
11 Package-Manager: Portage-3.0.4, Repoman-2.3.23
12 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
13
14 app-crypt/gnupg/files/gnupg-2.2.22-card-status.patch | 20 ++++++++++++++++++++
15 .../{gnupg-2.2.22.ebuild => gnupg-2.2.22-r1.ebuild} | 1 +
16 2 files changed, 21 insertions(+)
17
18 diff --git a/app-crypt/gnupg/files/gnupg-2.2.22-card-status.patch b/app-crypt/gnupg/files/gnupg-2.2.22-card-status.patch
19 new file mode 100644
20 index 00000000000..1a01e5ddbc5
21 --- /dev/null
22 +++ b/app-crypt/gnupg/files/gnupg-2.2.22-card-status.patch
23 @@ -0,0 +1,20 @@
24 +diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
25 +index 8a1d30d5b..ccc360fc8 100644
26 +--- a/scd/app-openpgp.c
27 ++++ b/scd/app-openpgp.c
28 +@@ -2357,10 +2357,15 @@ verify_chv2 (app_t app,
29 + int rc;
30 + char *pinvalue;
31 + int pinlen;
32 ++ int i;
33 +
34 + if (app->did_chv2)
35 + return 0; /* We already verified CHV2. */
36 +
37 ++ /* Make sure we have load the public keys. */
38 ++ for (i = 0; i < 3; i++)
39 ++ get_public_key (app, i);
40 ++
41 + if (app->app_local->pk[1].key || app->app_local->pk[2].key)
42 + {
43 + rc = verify_a_chv (app, pincb, pincb_arg, 2, 0, &pinvalue, &pinlen);
44
45 diff --git a/app-crypt/gnupg/gnupg-2.2.22.ebuild b/app-crypt/gnupg/gnupg-2.2.22-r1.ebuild
46 similarity index 99%
47 rename from app-crypt/gnupg/gnupg-2.2.22.ebuild
48 rename to app-crypt/gnupg/gnupg-2.2.22-r1.ebuild
49 index 71679032de6..3cd4a08ed40 100644
50 --- a/app-crypt/gnupg/gnupg-2.2.22.ebuild
51 +++ b/app-crypt/gnupg/gnupg-2.2.22-r1.ebuild
52 @@ -50,6 +50,7 @@ DOCS=(
53
54 PATCHES=(
55 "${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
56 + "${FILESDIR}/${P}-card-status.patch"
57 )
58
59 src_prepare() {