Browse Source

n/gnupg: Patched to fix a regression with OpenPGP cards.

current-20200608
Damien Goutte-Gattat 1 month ago
parent
commit
8fb3d845bb
2 changed files with 38 additions and 1 deletions
  1. +34
    -0
      n/gnupg/gnupg-2.2.22-fix-openpgp-regression.patch
  2. +4
    -1
      n/gnupg/gnupg.SlackBuild

+ 34
- 0
n/gnupg/gnupg-2.2.22-fix-openpgp-regression.patch View File

@@ -0,0 +1,35 @@
commit 0a9665187a7cbf68933b7162fb5f974177684a50
Author: NIIBE Yutaka <gniibe@fsij.org>
Date: Tue Sep 1 15:23:59 2020 +0900

scd: Fix a regression for OpenPGP card.
* scd/app-openpgp.c (verify_chv2): Make sure loading keys.
--
Fixes-commit: d2f1a0a791db3eb03c003365cbcd010bd8066edb
Reported-by: Michał Górny
GnuPG-bug-id: 5039
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 8a1d30d5b..ccc360fc8 100644
--- a/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);

+ 4
- 1
n/gnupg/gnupg.SlackBuild View File

@@ -37,7 +37,7 @@ WGET=${WGET:-https://gnupg.org/ftp/gcrypt/gnupg/$ARCHIVE}

# Build infos
NAMEPKG=${NAMEPKG:-gnupg}
BUILD=${BUILD:-1GGD}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@@ -88,6 +88,9 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Fix a regression that impairs working with OpenPGP cards
# <https://dev.gnupg.org/T5039>
patch -p 1 < $CWD/gnupg-2.2.22-fix-openpgp-regression.patch
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \


Loading…
Cancel
Save