From 79298e87d8436bf0b0bd07c2c1513d10a7eb5823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 24 Sep 2024 10:44:31 +0200 Subject: [PATCH] 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 --- g10/keyedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g10/keyedit.c b/g10/keyedit.c index 0fb19645d..a8d3ec685 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -3527,7 +3527,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;