summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/gnupg/files/gnupg-2.2.22-card-status.patch20
-rw-r--r--app-crypt/gnupg/gnupg-2.2.22-r1.ebuild (renamed from app-crypt/gnupg/gnupg-2.2.22.ebuild)1
2 files changed, 21 insertions, 0 deletions
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 000000000000..1a01e5ddbc56
--- /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
index 71679032de61..3cd4a08ed401 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() {