Home GnuPG
Diffusion GnuPG a3cb72af79ee

g10: Allow receiving cleartext secret keys from agent
a3cb72af79eeUnpublished

Unpublished Commit · Learn More

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

Description

g10: Allow receiving cleartext secret keys from agent

* g10/export.c (match_curve_skey_pk): New function, testing whether an
OpenPGP public key and an S-expression use the same curve.
* g10/export.c (cleartext_secret_key_to_openpgp): New function,
filling in the secret key parameters of a PKT_public_key object from
a corresponding cleartext S-expression.
* g10/export.c, g10/main.h (receive_seckey_from_agent): Add cleartext
parameter, enabling retrieval of the secret key, unlocked.
* g10/export.c (do_export_stream): Send cleartext as 0, keeping current
behavior.
* g10/keygen.c (card_store_key_with_backup): Use cleartext=0 to ensure
that smartcard backups are all passphrase-locked.

This sets up internal functionality to be capable of exporting
cleartext secret keys, but does not change any existing behavior.

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

Details

Provenance
dkgAuthored on Jun 10 2016, 10:15 PM
wernerCommitted on Jun 11 2016, 11:16 AM
Parents
rG7de74320767d: g10: Add openpgp_protected flag to agent secret key export functions
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rGa3cb72af79ee: g10: Allow receiving cleartext secret keys from agent (authored by Daniel Kahn Gillmor <dkg@fifthhorseman.net>).Jun 11 2016, 11:16 AM