Browse Source

Fixed transferable key output.

master
Edouard Tisserant 7 years ago
parent
commit
8728bcc1d5
2 changed files with 4 additions and 3 deletions
  1. +3
    -3
      dist/src/lib/create.c
  2. +1
    -0
      dist/src/lib/keyring.c

+ 3
- 3
dist/src/lib/create.c View File

@ -485,7 +485,7 @@ pgp_write_struct_pubkey_ptag(
const pgp_pubkey_t *key,
pgp_content_enum ptag)
{
return pgp_write_ptag(output, PGP_PTAG_CT_PUBLIC_KEY) &&
return pgp_write_ptag(output, ptag) &&
pgp_write_length(output, 1 + 4 + 1 + pubkey_length(key)) &&
write_pubkey_body(key, output);
}
@ -561,7 +561,7 @@ pgp_write_xfer_key(pgp_output_t *output,
/* matching selected user id */
if(uidsigp->uid == uididx)
{
if (!pgp_write(output, &uidsigp->packet.raw,
if (!pgp_write(output, uidsigp->packet.raw,
(unsigned)uidsigp->packet.length)) {
return 0;
}
@ -598,7 +598,7 @@ pgp_write_xfer_key(pgp_output_t *output,
/* matching selected subkey */
if(subkeysigp->subkey == subkeyidx)
{
if (!pgp_write(output, &subkeysigp->packet.raw,
if (!pgp_write(output, subkeysigp->packet.raw,
(unsigned)subkeysigp->packet.length)) {
return 0;
}


+ 1
- 0
dist/src/lib/keyring.c View File

@ -720,6 +720,7 @@ pgp_copy_packet(pgp_subpacket_t *dst, const pgp_subpacket_t *src)
dst->length = src->length;
(void) memcpy(dst->raw, src->raw, src->length);
}
return dst;
}


Loading…
Cancel
Save