diff options
author | Werner Koch <wk@gnupg.org> | 2019-02-06 14:07:42 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-02-06 14:07:42 +0100 |
commit | 9a9cb0257aebb1480b999fdf9d90904083eb8e3c (patch) | |
tree | df48355c0f183430e2a0c375882911cc629de524 /scd/app-common.h | |
parent | scd: Fix parameter name of app_change_key. (diff) | |
download | gnupg2-9a9cb0257aebb1480b999fdf9d90904083eb8e3c.tar.xz gnupg2-9a9cb0257aebb1480b999fdf9d90904083eb8e3c.zip |
scd: Make app_genkey and supporting ISO function more flexible.
* scd/app.c (app_genkey): Add arg keytype.
* scd/app-common.h (struct app_ctx_s): Fitto for the genkey member.
* scd/command.c (cmd_genkey): Adjust for change.
* scd/iso7816.c (do_generate_keypair): Replace arg read_only by new
args p1 and p2.
(iso7816_read_public_key): Adjust for this.
(iso7816_generate_keypair): Add new args p1 and p2.
* scd/app-openpgp.c (do_genkey): Adjust for changes.
--
The OpenPGP card creates keys according to parameters read from a data
object. Other cards we are about to implement require a direct
specification of the requested keytype. This patch implements the
required changes.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd/app-common.h')
-rw-r--r-- | scd/app-common.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scd/app-common.h b/scd/app-common.h index d8b301c9a..e9d167ecc 100644 --- a/scd/app-common.h +++ b/scd/app-common.h @@ -106,8 +106,8 @@ struct app_ctx_s { void *pincb_arg, const unsigned char *pk, size_t pklen); gpg_error_t (*genkey) (app_t app, ctrl_t ctrl, - const char *keynostr, unsigned int flags, - time_t createtime, + const char *keyref, const char *keytype, + unsigned int flags, time_t createtime, gpg_error_t (*pincb)(void*, const char *, char **), void *pincb_arg); gpg_error_t (*change_pin) (app_t app, ctrl_t ctrl, @@ -178,8 +178,8 @@ gpg_error_t app_writekey (app_t app, ctrl_t ctrl, void *pincb_arg, const unsigned char *keydata, size_t keydatalen); gpg_error_t app_genkey (app_t app, ctrl_t ctrl, - const char *keynostr, unsigned int flags, - time_t createtime, + const char *keynostr, const char *keytype, + unsigned int flags, time_t createtime, gpg_error_t (*pincb)(void*, const char *, char **), void *pincb_arg); gpg_error_t app_get_challenge (app_t app, ctrl_t ctrl, size_t nbytes, |