card: Make "generate" work for PIV cards.
authorWerner Koch <wk@gnupg.org>
Fri, 8 Feb 2019 10:58:27 +0000 (11:58 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 8 Feb 2019 10:58:27 +0000 (11:58 +0100)
commita1cb4a940f308ba21ecc002b044efccf0c547784
tree002ea83019180b5c7c33cd251acbb66afef37c6f
parentb349adc5c0d00d2fc405a45bd078f1580b5610cc
card: Make "generate" work for PIV cards.

* tools/card-call-scd.c (scd_genkey_cb): Make createtime optional.
(scd_genkey_cb):  Ditto.  Add arg algo.
* tools/gpg-card-tool.c (cmd_generate): Add options and factor card
specific code out to ...
(generate_openpgp, generate_generic): new functions.
--

This patch keeps the interactive OpenPGP mode but adds a pure command
line mode for other cards; in particular PIV cards.  What we still
need to do is:
 a) Add an interactive mode for PIV cards
 b) Add a command line mode for OpenPGP cards.

Signed-off-by: Werner Koch <wk@gnupg.org>
tools/card-call-scd.c
tools/card-tool.h
tools/gpg-card-tool.c