Home GnuPG
Diffusion GnuPG 02cf1357dd5e

g10: Fix exporting secret keys of certain sizes.
02cf1357dd5eUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

g10: Fix exporting secret keys of certain sizes.

* g10/build-packet.c (do_key): Do not use the header length specified
by the public key packet from the keyring, but let 'write_header2'
compute the required length.

Specifically exporting RSA keys of length 1024 failed, as the encoded
public key packet requires 141 bytes a length that fits into one byte,
but the secret key is significantly larger, making the export fail.

  • GnuPG-bug-id: T2307
  • Signed-off-by: Justus Winter <justus@g10code.com>

Details

Provenance
justusAuthored on Apr 7 2016, 1:55 PM
Parents
rG71040f48ef6b: g10: Fix typo.
Branches
Unknown
Tags
Unknown