summaryrefslogtreecommitdiffstats
path: root/g10/keyedit.c
diff options
context:
space:
mode:
authorIngo Klöcker <dev@ingo-kloecker.de>2024-09-24 10:44:31 +0200
committerIngo Klöcker <dev@ingo-kloecker.de>2024-09-24 23:05:13 +0200
commit79298e87d8436bf0b0bd07c2c1513d10a7eb5823 (patch)
treefd556a1a99a3286557200229a859c9b3e9c66033 /g10/keyedit.c
parentcommon: Add debug code to gnupg_exec_tool_stream (diff)
downloadgnupg2-79298e87d8436bf0b0bd07c2c1513d10a7eb5823.tar.xz
gnupg2-79298e87d8436bf0b0bd07c2c1513d10a7eb5823.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
Diffstat (limited to '')
-rw-r--r--g10/keyedit.c2
1 files changed, 1 insertions, 1 deletions
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;