aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2024-09-24 08:44:31 +0000
committerWerner Koch <[email protected]>2024-10-29 12:11:47 +0000
commitf355f3f3818211e4c977c6c2e60e0d2f8c7be945 (patch)
tree918d45e6a30ad6b6d345459f523c5d766e9d49ee
parentcommon: Fix a race condition in creating socketdir. (diff)
downloadgnupg-f355f3f3818211e4c977c6c2e60e0d2f8c7be945.tar.gz
gnupg-f355f3f3818211e4c977c6c2e60e0d2f8c7be945.zip
gpg: Fix --quick-set-expire for V5 subkey fingerprints
* g10/keyedit.c (keyedit_quick_set_expire): Use actual size of fingerprint. -- The size of the fingerprints is either 20 (V4) or 32 (V5). Using the actual size of the fingerprints fixes the lookup of subkeys with V5 fingerprint. GnuPG-bug-id: 7298 (cherry picked from commit 79298e87d8436bf0b0bd07c2c1513d10a7eb5823)
-rw-r--r--g10/keyedit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 754f23a38..f6722ebeb 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -3526,7 +3526,7 @@ keyedit_quick_set_expire (ctrl_t ctrl, const char *fpr, const char *expirestr,
&& !pk->flags.revoked )
{
fingerprint_from_pk (pk, fprbin, &fprlen);
- if (fprlen == 20 && !memcmp (fprbin, desc.u.fpr, 20))
+ if (fprlen == desc.fprlen && !memcmp (fprbin, desc.u.fpr, fprlen))
{
node->flag |= NODFLG_SELKEY;
any = 1;