kbx: Fix short KID and long KID handling for FPR32.

* kbx/keybox-search.c (blob_cmp_fpr_part): For FPR32, it's
the first part in the fingerprint.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-07-27 15:30:20 +09:00
parent daa2cec6a5
commit fa4a2bd7a1
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ blob_cmp_fpr_part (KEYBOXBLOB blob, const unsigned char *fpr,
storedfprlen = (get16 (buffer + off + 32) & 0x80)? 32:20;
else
storedfprlen = 20;
if (storedfprlen == fproff + fprlen
if ((fpr32 || storedfprlen == fproff + fprlen)
&& !memcmp (buffer + off + fproff, fpr, fprlen))
return idx+1; /* found */
}