Diffusion GnuPG 1c0fa3e6f746

card: Implement non-interactive mode.

Authored by werner on Jan 31 2019, 6:57 PM.

Description

card: Implement non-interactive mode.

* tools/card-tool.h (opt): Add field 'initialized'.
* tools/card-call-scd.c (scd_learn): Set it.
* tools/gpg-card-tool.c (main): Reworked.
(dispatch_command): New.

This work is not yet finished because most commands need some tweaks
for non-interactive work. What you already can do are things like:

$ gpg-card-tool list -- 'auth <oldkey' \

  • auth --setkey --raw 123456781234567812345678 -- help auth

Which will list the current card, authenticate using a hex encoded key
from the file "oldkey", set the new admin key to "123...78", and print
help for the auth command. Note that the -- acts as a delimiter
between commands. To use a double dash as argument to a command the
entire command must be quoted.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Committed
wernerJan 31 2019, 6:57 PM
Parents
rGda383257404c: card: New command 'authenticate'.
Branches
Unknown
Tags
Unknown