diff options
author | Werner Koch <[email protected]> | 2019-02-06 13:07:42 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-02-11 09:59:32 +0000 |
commit | 14816c798099925e47908e7ce415412d72fbe28e (patch) | |
tree | a798e566d395cbdf8643f2d89252c741dd3bde25 /scd/command.c | |
parent | scd: Fix parameter name of app_change_key. (diff) | |
download | gnupg-14816c798099925e47908e7ce415412d72fbe28e.tar.gz gnupg-14816c798099925e47908e7ce415412d72fbe28e.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 <[email protected]>
(cherry picked from commit 9a9cb0257aebb1480b999fdf9d90904083eb8e3c)
Diffstat (limited to 'scd/command.c')
-rw-r--r-- | scd/command.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c index ec6793a5f..1dfa65217 100644 --- a/scd/command.c +++ b/scd/command.c @@ -1138,7 +1138,8 @@ cmd_genkey (assuan_context_t ctx, char *line) keyno = xtrystrdup (keyno); if (!keyno) return out_of_core (); - rc = app_genkey (ctrl->app_ctx, ctrl, keyno, force? 1:0, + rc = app_genkey (ctrl->app_ctx, ctrl, keyno, NULL, + force? APP_GENKEY_FLAG_FORCE : 0, timestamp, pin_cb, ctx); xfree (keyno); |