mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
kbx: A 20 byte fingerprint is right filled in version 2 blob.
* kbx/keybox-blob.c (create_blob_header): Fix creating FPR20 key in blob with 32-byte fingerprint. -- GnuPG-bug-id: 5609 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
cc6152b802
commit
08a3a4db27
@ -578,6 +578,8 @@ create_blob_header (KEYBOXBLOB blob, int blobtype, int as_ephemeral,
|
|||||||
if (want_fpr32)
|
if (want_fpr32)
|
||||||
{
|
{
|
||||||
put_membuf (a, blob->keys[i].fpr, blob->keys[i].fprlen);
|
put_membuf (a, blob->keys[i].fpr, blob->keys[i].fprlen);
|
||||||
|
if (blob->keys[i].fprlen < 32)
|
||||||
|
put_membuf (a, NULL, 32 - blob->keys[i].fprlen);
|
||||||
blob->keys[i].off_kid_addr = a->len;
|
blob->keys[i].off_kid_addr = a->len;
|
||||||
if (blob->keys[i].fprlen == 32)
|
if (blob->keys[i].fprlen == 32)
|
||||||
put16 ( a, (blob->keys[i].flags | 0x80));
|
put16 ( a, (blob->keys[i].flags | 0x80));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user