Home GnuPG
Diffusion GnuPG 9a9cb0257aeb

scd: Make app_genkey and supporting ISO function more flexible.

Description

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>

Details

Provenance
wernerAuthored on Feb 6 2019, 2:07 PM
Parents
rGc26af8ac263e: scd: Fix parameter name of app_change_key.
Branches
Unknown
Tags
Unknown