Home GnuPG
Diffusion GnuPG 392e59a3d487

gpg: enable OpenPGP export of cleartext keys with comments

Description

gpg: enable OpenPGP export of cleartext keys with comments

* g10/export.c (cleartext_secret_key_to_openpgp): ignore trailing
sublists in private-key S-expression.

When gpg-agent learns about a private key from its ssh-agent
interface, it stores its S-expression with the comment attached. The
export mechanism for OpenPGP keys already in cleartext was too brittle
because it would choke on these comments. This change lets it ignore
any additional trailing sublists.

  • Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  • Gnupg-Bug-Id: T4490

Details

Provenance
dkgAuthored on May 14 2019, 3:22 AM
wernerCommitted on May 15 2019, 9:02 AM
Parents
rGa4be077abdbf: gpgconf: Support --homedir for --launch.
Branches
Unknown
Tags
Unknown
Tasks
T4490: --export-secret-keys fails with unusually-created secret key