diff options
author | Ingo Klöcker <dev@ingo-kloecker.de> | 2024-09-24 10:44:31 +0200 |
---|---|---|
committer | Ingo Klöcker <dev@ingo-kloecker.de> | 2024-09-24 23:05:13 +0200 |
commit | 79298e87d8436bf0b0bd07c2c1513d10a7eb5823 (patch) | |
tree | fd556a1a99a3286557200229a859c9b3e9c66033 /g10/keyedit.c | |
parent | common: Add debug code to gnupg_exec_tool_stream (diff) | |
download | gnupg2-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.c | 2 |
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; |