commit: eecfafdf8668a17309be1b1e5441b489c310e33a Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> AuthorDate: Tue Sep 1 09:40:50 2020 +0000 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> CommitDate: Tue Sep 1 09:41:47 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eecfafdf
app-crypt/gnupg: fix smart card autodetection Closes: https://bugs.gentoo.org/739630q Package-Manager: Portage-3.0.4, Repoman-2.3.23 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> app-crypt/gnupg/files/gnupg-2.2.22-card-status.patch | 20 ++++++++++++++++++++ .../{gnupg-2.2.22.ebuild => gnupg-2.2.22-r1.ebuild} | 1 + 2 files changed, 21 insertions(+) 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 new file mode 100644 index 00000000000..1a01e5ddbc5 --- /dev/null +++ b/app-crypt/gnupg/files/gnupg-2.2.22-card-status.patch @@ -0,0 +1,20 @@ +diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c +index 8a1d30d5b..ccc360fc8 100644 +--- a/scd/app-openpgp.c ++++ b/scd/app-openpgp.c +@@ -2357,10 +2357,15 @@ verify_chv2 (app_t app, + int rc; + char *pinvalue; + int pinlen; ++ int i; + + if (app->did_chv2) + return 0; /* We already verified CHV2. */ + ++ /* Make sure we have load the public keys. */ ++ for (i = 0; i < 3; i++) ++ get_public_key (app, i); ++ + if (app->app_local->pk[1].key || app->app_local->pk[2].key) + { + rc = verify_a_chv (app, pincb, pincb_arg, 2, 0, &pinvalue, &pinlen); diff --git a/app-crypt/gnupg/gnupg-2.2.22.ebuild b/app-crypt/gnupg/gnupg-2.2.22-r1.ebuild similarity index 99% rename from app-crypt/gnupg/gnupg-2.2.22.ebuild rename to app-crypt/gnupg/gnupg-2.2.22-r1.ebuild index 71679032de6..3cd4a08ed40 100644 --- a/app-crypt/gnupg/gnupg-2.2.22.ebuild +++ b/app-crypt/gnupg/gnupg-2.2.22-r1.ebuild @@ -50,6 +50,7 @@ DOCS=( PATCHES=( "${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch" + "${FILESDIR}/${P}-card-status.patch" ) src_prepare() {
