diff options
author | Werner Koch <wk@gnupg.org> | 2019-04-02 18:57:09 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-04-02 18:57:09 +0200 |
commit | a480182f9d7ec316648cb64248f7a0cc8f681bc3 (patch) | |
tree | 1203776b7eca97c35be39826e145bfca46741059 /g10/call-agent.h | |
parent | common: Extend function pubkey_algo_string. (diff) | |
download | gnupg2-a480182f9d7ec316648cb64248f7a0cc8f681bc3.tar.xz gnupg2-a480182f9d7ec316648cb64248f7a0cc8f681bc3.zip |
gpg: Allow direct key generation from card with --full-gen-key.
* g10/call-agent.c (agent_scd_readkey): New.
* g10/keygen.c (ask_key_flags): Factor code out to ..
(ask_key_flags_with_mask): new.
(ask_algo): New mode 14.
--
Note that this new menu 14 is always displayed. The usage flags can
be changed only in --expert mode, though. Creating and using signing
keys works but decryption does not yet work; we will need to tweak a
couple of other places for that. Tested with a Yubikey's PIV app.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/call-agent.h')
-rw-r--r-- | g10/call-agent.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/call-agent.h b/g10/call-agent.h index 0a545b22e..cb874fdad 100644 --- a/g10/call-agent.h +++ b/g10/call-agent.h @@ -114,10 +114,13 @@ int agent_scd_writecert (const char *certidstr, /* Send a GENKEY command to the SCdaemon. */ int agent_scd_genkey (int keyno, int force, u32 *createtime); -/* Send a READKEY command to the SCdaemon. */ +/* Send a READCERT command to the SCdaemon. */ int agent_scd_readcert (const char *certidstr, void **r_buf, size_t *r_buflen); +/* Send a READKEY command to the SCdaemon. */ +gpg_error_t agent_scd_readkey (const char *keyrefstr, gcry_sexp_t *r_result); + /* Change the PIN of an OpenPGP card or reset the retry counter. */ int agent_scd_change_pin (int chvno, const char *serialno); |