aboutsummaryrefslogtreecommitdiffstats
path: root/g10/main.h
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <[email protected]>2016-06-10 20:15:35 +0000
committerWerner Koch <[email protected]>2016-06-11 09:16:19 +0000
commita3cb72af79ee645eda212f31ab0b266f2c3d9f29 (patch)
treec2426332fc63d0138c8364f51d83ec8a06dc2ef0 /g10/main.h
parentg10: Add openpgp_protected flag to agent secret key export functions (diff)
downloadgnupg-a3cb72af79ee645eda212f31ab0b266f2c3d9f29.tar.gz
gnupg-a3cb72af79ee645eda212f31ab0b266f2c3d9f29.zip
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 <[email protected]>
Diffstat (limited to '')
-rw-r--r--g10/main.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/g10/main.h b/g10/main.h
index bda0bc188..7b716ffd6 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -389,6 +389,7 @@ gpg_error_t export_pubkey_buffer (ctrl_t ctrl, const char *keyspec,
void **r_data, size_t *r_datalen);
gpg_error_t receive_seckey_from_agent (ctrl_t ctrl, gcry_cipher_hd_t cipherhd,
+ int cleartext,
char **cache_nonce_addr, const char *hexgrip,
PKT_public_key *pk);