1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-10-29 19:48:43 +01:00

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
This commit is contained in:
Ingo Klöcker 2024-09-24 10:44:31 +02:00
parent 11387b24a5
commit 79298e87d8

View File

@ -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;