aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpg-card.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-05-16card: Fix compiler warning.Werner Koch1-3/+3
* tools/gpg-card.h (opt): Make gpg_program, gpgsm_program, and agent_program const.
2024-02-27Allow tilde expansion for the foo-program options.Werner Koch1-3/+3
* agent/gpg-agent.c (parse_rereadable_options): Use make_filename_try for opt.pinentry_program. Change definition accordingly. * g10/gpg.c (main): Use make_filename for agent_program, dirmngr_program, and keyboxd_program. Change definition accordingly. * sm/gpgsm.c (main): Ditto. * tools/gpg-card.c (parse_arguments): Ditto. * tools/gpg-connect-agent.c (main): Ditto. * tools/gpg-wks-client.c (parse_arguments): Likewise. Do it also for option --output. (process_confirmation_request): Print a note for a successful sent. -- GnuPG-bug-id: 7017
2024-01-22card: New subcommand "checkkeys".Werner Koch1-0/+2
* agent/command.c (cmd_havekey): Add new option --info. * tools/card-call-scd.c (scd_readkey): Allow using without result arg. (struct havekey_status_parm_s): New. (havekey_status_cb): New. (scd_havekey_info): New. (scd_delete_key): New. * tools/gpg-card.c (print_keygrip): Add arg with_lf. (cmd_checkkeys): New. (cmdCHECKKEYS): New. (cmds): Add command "checkkeys". (dispatch_command, interactive_loop): Call cmd_checkkeys. -- GnuPG-bug-id: 6943
2021-04-21card: New option --shadow for command list.Werner Koch1-1/+2
* tools/card-call-scd.c (scd_readkey): Add arg create_shadow. * tools/gpg-card.c (list_one_kinfo): Add arg create_shadow and pass it down to scd-readkey. Change all callers to convey this arg. (cmd_list): Add option --shadow.
2021-04-01card: New flag --reread for LIST.Werner Koch1-1/+1
* tools/gpg-card.c (cmd_list): Add flag --reread. * tools/card-call-scd.c (scd_learn): New arg reread. * tools/card-call-scd.c (release_card_info): Fix releasing of the new label var. Signed-off-by: Werner Koch <[email protected]>
2021-03-30card: Print the key's label if available.Werner Koch1-0/+3
* tools/gpg-card.h (struct key_info_s): Add field 'label'. * tools/card-call-scd.c (learn_status_cb): Parse KEY-LABEL. (scd_learn): Always request KEY-LABEL. * tools/gpg-card.c (nullnone): New. (list_one_kinfo, list_card): Use it. Print the label. -- PKCS#15 defines label which help to understand for what a key is intended. Print them. Signed-off-by: Werner Koch <[email protected]>
2021-03-18card: Print PIN descriptions and fix number of printed retry counters.Werner Koch1-0/+3
* tools/gpg-card.h (struct card_info_s): Add fields nmaxlen, nchvinfo, and chvlabels. * tools/card-call-scd.c (release_card_info): Free chvlabels. (learn_status_cb): Parse CHV-LABEL. Set nmaxlen and nchvinfo. * tools/gpg-card.c (list_retry_counter): Print CHV labels. Signed-off-by: Werner Koch <[email protected]>
2020-11-27card: Let the APDU command prints a description of the status word.Werner Koch1-0/+3
* tools/card-call-scd.c (scd_apdu_strerror): New. * tools/gpg-card.c (cmd_apdu): Print a description. -- Pretty convenient to explore smartcards.
2020-09-18common,agent,dirmngr,g10,tools: Fix split_fields API.NIIBE Yutaka1-1/+1
* common/stringhelp.h (split_fields): Use const * for the strings in the ARRAY. (split_fields_colon): Likewise. * common/stringhelp.c (split_fields, split_fields_colon): Fix the implementation. * agent/call-scd.c, agent/command.c: Follow the change. * common/t-stringhelp.c, dirmngr/loadswdb.c: Likewise. * g10/call-agent.c, tools/card-call-scd.c: Likewise. * tools/card-yubikey.c, tools/gpg-card.c: Likewise. * tools/gpg-card.h, tools/gpg-wks-client.c: Likewise. * tools/gpgconf-comp.c, tools/gpgconf.c: Likewise. * tools/wks-util.c: Likewise. -- The strings in the ARRAY don't need to be released by caller, as those are references. It's easier to follow the code when it's explicitly const *. Signed-off-by: NIIBE Yutaka <[email protected]>
2020-09-08gpg,tools: Add handling of supported algorithms by a card.NIIBE Yutaka1-0/+2
* g10/call-agent.h (struct agent_card_info_s): Add supported_keyalgo. * g10/call-agent.c (learn_status_cb): Parse KEY-ATTR-INFO. (agent_release_card_info): Release supported_keyalgo. * tools/gpg-card.h (struct card_info_s): Add supported_keyalgo. * tools/card-call-scd.c (learn_status_cb): Parse KEY-ATTR-INFO. (release_card_info): Release supported_keyalgo. Signed-off-by: NIIBE Yutaka <[email protected]>
2020-07-02Support a history file in gpg-card and gpg-connect-agent.Werner Koch1-0/+2
* common/gpgrlhelp.c (read_write_history): New. (gnupg_rl_initialize): Register new function. * common/ttyio.c (my_rl_rw_history): New var. (tty_private_set_rl_hooks): Add arg read_write_history. (tty_read_history): New. (tty_write_history): New. * tools/gpg-card.c (HISTORYNAME): New. (oNoHistory): New enum value. (opts): New option --no-history. (cmd_history): New. (cmds): New command "history". (interactive_loop): Read and save the history. * tools/gpg-connect-agent.c (HISTORYNAME): New. (opts): New option --no-history. (main): Read and save the history. New command /history. -- Yeah, finally we have stored history; I should have added this much earlier. Signed-off-by: Werner Koch <[email protected]>
2020-06-30card: Better detect removed cards. Add TCOS PIN menu.Werner Koch1-1/+2
* tools/card-call-scd.c (scd_change_pin): Add arg 'nullpin'. * tools/gpg-card.h (struct card_info_s): Add field 'card_removed'. * tools/gpg-card.c (fixup_scd_errors): New. (maybe_set_card_removed): New. (list_one_kinfo): Change type of first arg to get access to INFO. Set card_removed flag. (list_all_kinfo): Improve label alignment. (cmd_list): Check that the current card is still available. (cmd_passwd): Add option --nullpin and menu to chnage TCOS PINs. (dispatch_command): Handle card_removed flag. (interactive_loop): Ditto. -- Note that that I was not able to change the NullPIN of the standard PIN using a Signature V2 Brainpool test card. Changing the NullPIN of the QES PIN worked, though. I checked the commands send to scdaemon and they were correct - I used the very same command with gpg-connect-agent last week to set a Pin for a production Brainpool Signature card. Thus this might be a problem with this specific test card. Signed-off-by: Werner Koch <[email protected]>
2020-06-03card: Improve openpgp key writing in "writecert".Werner Koch1-0/+1
* tools/card-keys.c (struct export_key_status_parm_s): New. (export_key_status_cb): New. (get_minimal_openpgp_key): New. * tools/gpg-card.c (cmd_writecert): Allow writing a keyblock directly from an existing gpg key. Signed-off-by: Werner Koch <[email protected]>
2020-05-28card: New command "apdu"Werner Koch1-1/+2
* tools/card-call-scd.c (scd_apdu): Add optional arg 'options'. * tools/gpg-card.c (cmd_apdu): New. (enum cmdids): Add cmdAPDU. (dispatch_command): Add command "apdu". (interactive_loop): Ditto. -- This command is hidden because it can be used to brick a card. The command is basically the same as sending "scd apdu" in gpg-connect-agent but here we do full decoding and printing in hex. Signed-off-by: Werner Koch <[email protected]>
2020-05-27card: Take care of removed and re-inserted cards.Werner Koch1-0/+1
* tools/gpg-card.c (cmd_list): Take care of the need_sn_cmd flag. (cmd_factoryreset): Clear that flag. (dispatch_command): Set flag after a reset and after a CARD_NOT_PRESENT error. --
2020-05-26card: Implement UID command and print capabilities.Werner Koch1-2/+7
* tools/card-call-scd.c (learn_status_cb): Return the full value for UIF. Add info about SM, MCL3, and PD. * tools/gpg-card.h (struct card_info_s): Add corresponding fields. * tools/gpg-card.c (list_openpgp): Print capabilities. Print the permanent flag for UIF. (cmd_uif): Implement. Signed-off-by: Werner Koch <[email protected]>
2020-05-07card: Allow listing of NKS cards.Werner Koch1-2/+2
* tools/card-call-scd.c (learn_status_cb): Always fill chvinfo. * tools/gpg-card.h (struct card_info_s): Increase size of chvinfo and chvmaxlen. * tools/gpg-card.c (list_nks): New. (print_a_version): Support single part version numbers. (list_card): Call list_nks. -- Note that chvmaxlen is not yet used with NKS. Signed-off-by: Werner Koch <[email protected]>
2020-04-03gpg,card: Use the new MANUFACTURER attribute.Werner Koch1-0/+2
* tools/gpg-card.h (struct card_info_s): Add manufacturer fields. * tools/card-call-scd.c (release_card_info): Release them. (learn_status_cb): Parse MANUFACTURER attribute. * tools/gpg-card.c (get_manufacturer): Remove. (list_card): Use the new attribute. * g10/call-agent.h (struct agent_card_info_s): Add manufacturer fields. * g10/call-agent.c (agent_release_card_info): Release them. (learn_status_cb): Parse MANUFACTURER attribute. * g10/card-util.c (get_manufacturer): Remove. (current_card_status): Use new attribute. -- This does away with the duplicated OpenPGP vendor tables; they are now at a better place (app-openpgp.c). Signed-off-by: Werner Koch <[email protected]>
2020-02-12card: List more info for an OpenPGP key.Werner Koch1-0/+1
* tools/gpg-card.h (struct pubkey_s): Add field created. * tools/card-keys.c (parse_key_record): Set that field. * tools/gpg-card.c (print_shax_fpr): Print the fingerprint without spaces for easier c+p. (list_one_kinfo): Print the actual used fingerprint and creation date from the keyblock. -- A common problem with OpenPGP cards is that the fingerprint as stored on the card does not match the actual fingerprint. Print both values to be able to investigate such issues. Signed-off-by: Werner Koch <[email protected]>
2020-02-12card: New option --no-key-lookup.Werner Koch1-0/+2
* tools/gpg-card.h (opt): Add var no_key_lookup. * tools/gpg-card.c (oNoKeyLookup): New const. (opts): New option --no-key-lookup. (list_one_kinfo): Add arg no_key_lookup and implement. (list_all_kinfo): Add arg no_key_lookup. (list_openpgp, list_piv, list_card): Ditto. (cmd_list): New option --no-key-lookup. -- Printing the OpenPGP and X.509 keys used for a specific card key can be a lengthy operation. The new command line option and option to "list" allows to suppress that part of the output.
2020-02-11card: First code to actually create openpgp keys.Werner Koch1-1/+1
* tools/gpg-card.c (generate_all_openpgp_card_keys): Add demo key generation. (generate_key): Allow generatiing one OpenPGP key. -- This does now allows to create a single OpenPGP key optioanlly with a specified parameter. For example to create an auth key: gpg-card generate --algo=ed25519 OPENPGP.3 Using option --force will overwrite and already existing key. scdaemon does here take care of swicthing the key attributes before generating the key. TODO: We need to add some more stuff to app-openpgp so that the user is not annoyed by beeing asked to enter the Admin-PIN twice (change the key attributes clear the verification state). gpg's key generation also needs some tweaks for using an existing card key which has no key stub in private-keys-v1.d. Signed-off-by: Werner Koch <[email protected]>
2020-02-10build: Always use EXTERN_UNLESS_MAIN_MODULE pattern.Werner Koch1-0/+1
* common/util.h (EXTERN_UNLESS_MAIN_MODULE): Add the definion only here but now without the Norcroft-C. Change all other places where it gets defined. * common/iobuf.h (iobuf_debug_mode): Declare unconditionally as extern. * common/iobuf.c (iobuf_debug_mode): Define it here. * agent/gpg-agent.c (INCLUDED_BY_MAIN_MODULE): Define here and also in all main modules of all other programs. * g10/main.h: Put util.h before the local header files. -- This change is required for use with gcc/ld's LTO feature which does not allow common blocks. Further gcc 10 will make -fno-common the default and thus this chnage is always needed. What a pitty. Co-authored-by: Tomáš Mráz GnuPG-bug-id: 4831 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 21d9bd8b87a9f793a106095e3838eb71825189d7) - Applied respective chnages also to gpg-card and keyboxd. Signed-off-by: Werner Koch <[email protected]>
2020-02-10card: Remove command "key-attr" and hack on "generate".Werner Koch1-11/+5
* tools/gpg-card.h (struct key_attr): Remove. (struct key_info_s): Remove key_attr. Add keyalgo and keyalgo_id. * tools/card-call-scd.c (learn_status_cb): Rework the key-attr info. * tools/gpg-card.c (list_one_kinfo): Always show the algorithm; if there is no key show the key attributes instead. (list_openpgp): Do not print the "Key attributes". (generate_key): Factor the repalce key pormpt out to ... (ask_replace_keys): new. (generate_openpgp): Rename to generate_all_openpgp_card_keys and add an algo parameter. (generate_generic): Rename to generate_key. Prepare generation of a single OpenPGP key. (cmd_generate): Revamp. (ask_card_rsa_keysize): Remove. (ask_card_keyattr): Remove. (do_change_keyattr): Remove. (cmd_keyattr): Remove. (enum cmdids): Remove cmdKEYATTR. (cmds): Ditto. (dispatch_command): Ditto. (interactive_loop): Ditto. -- This change shows the key attributes of an OpenPGP card instead of the key's algorithm if no key exists. It also remove the key-attr command because for uniformity it is better to do this directly in scd/app-openpgp.c At least for this new gpg-card tool. There a couple of other changes but to the generate command but they are not yet ready. Signed-off-by: Werner Koch <[email protected]>
2020-01-16card: Allow switching of cards and applications.Werner Koch1-0/+6
* tools/card-call-scd.c (struct card_cardlist_parm_s): Add field with_apps. (card_cardlist_cb): Handle the new with_apps flag. (scd_switchcard): New. (scd_switchapp): New. (scd_applist): New. (scd_serialno): Pass --all also in --demand mode. * tools/gpg-card.c (cmd_list): Simplify switching of cards. Add switching of alls. Print a list of apps per card. -- Note that the output format of "list --card" slightly changes: The current card is indicated with an asterisk. That should not harm any robust parsers which might already be in use. It is anyway a development version. Signed-off-by: Werner Koch <[email protected]>
2019-03-28card: Allow "yubikey disable" only for Yubikey-5 and later.Werner Koch1-1/+2
* tools/card-yubikey.c (yubikey_commands): Add new arg INFO and test for Yubikey-5. * tools/gpg-card.c (cmd_yubikey): Pass info to yubikey_commands. -- The configuration can be read from a Yubikey-4 but not be written. The mode command is also not useful because it allows only the selection of transports. It does not allow to disable single applications based on one transport (like OPGP and PIV). Thsi patch shows an appropriate error message. Signed-off-by: Werner Koch <[email protected]>
2019-03-05card: Print card version. Check for bad Yubikeys.Werner Koch1-0/+2
* scd/app.c (app_new_register): Set card version for Yubikeys. (app_write_learn_status): Print CARDVERSION and APPVERSION. * tools/card-call-scd.c (learn_status_cb): Detect them. * tools/gpg-card.h (struct card_info_s): Add appversion and cardversion. * tools/gpg-card.c (list_openpgp): Remove version printing from serial number. (print_a_version): New. (list_card): Print card and app version. (cmd_generate): Do not allow broken Yubikeys. Signed-off-by: Werner Koch <[email protected]>
2019-03-05scd:piv: Implement import of private keys for Yubikeys.Werner Koch1-2/+1
* scd/app-piv.c (concat_tlv_list): Add arg 'secure' and adjust callers. (writekey_rsa, writekey_ecc): New. (do_writekey): New. (do_writecert): Provide a better error message for an empty cert. (app_select_piv): Register do_writekey. * scd/iso7816.c (iso7816_send_apdu): New. * scd/app-common.h (APP_WRITEKEY_FLAG_FORCE): New. * agent/command.c (cmd_keytocard): Make the timestamp optional. * tools/card-call-scd.c (inq_writekey_parms): Remove. (scd_writekey): Rewrite. * tools/gpg-card.c (cmd_writekey): New. (enum cmdids): Add cmdWRITEKEY. (dispatch_command, interactive_loop): Call cmd_writekey. -- This has been tested with gpgsm and RSA keys. For ECC keys only partly tested using the sample OpenPGP nistp256 and nistp384 keys because gpgsm does not yet support ECC certificates and thus we can't write the certificates to the cert object after a writekey. Note that they nevertheless show up in "gpgcard list" because gpg-card searches for them in gpg and gpgsm. However, this does not work completely. Signed-off-by: Werner Koch <[email protected]>
2019-02-25card: Rename gpg-card-tool to gpg-card.Werner Koch1-7/+7
* tools/card-tool-keys.c: Rename to card-keys.c. * tools/card-tool-misc.c: Rename to card-misc.c. * tools/card-tool-yubikey.c: Rename to card-yubikey.c. * tools/card-tool.h: Rename to gpg-card.h. * tools/gpg-card-tool-w32info.rc: Rename to gpg-card-w32info.rc * doc/card-tool.texi: Rename top gpg-card.texi Signed-off-by: Werner Koch <[email protected]>
2019-02-21card: Print usage info for each key.Werner Koch1-1/+1
* tools/card-call-scd.c (learn_status_cb): Handle extended KEYPARIRINFO. * tools/card-tool.h (struct key_info_s): Add field 'usage'. * tools/gpg-card-tool.c (list_one_kinfo): Show usage flags. Signed-off-by: Werner Koch <[email protected]>
2019-02-13card: New command "yubikey".Werner Koch1-1/+7
* tools/card-tool-yubikey.c: New. * tools/Makefile.am (gpg_card_tool_SOURCES): Add it. * tools/card-call-scd.c (scd_apdu): Allow returning data. * tools/card-tool-misc.c (send_apdu): New. Move from gpg-card-tool.c and let it return data. Change all callers. * tools/gpg-card-tool.c (cmd_writecert): Prepend the certref with the current application type. (cmd_yubikey): New. -- This command allows listing of active applications and to enable or disable selected applications. This is in particular useful to disable the OpenPGP application so that the PIV support can easily be tested. Signed-off-by: Werner Koch <[email protected]>
2019-02-08common: Provide function to get public key algo names in our format.Werner Koch1-2/+0
* tools/card-tool-misc.c (pubkey_algo_string): Move to ... * common/sexputil.c (pubkey_algo_string): here. -- The new gpg format for public key algorithms is useful at other places as well. Thus we make this new function available. Note that the code we use in gpg is not based on s-expressions and thus a new function was required. Signed-off-by: Werner Koch <[email protected]>
2019-02-08card: Make "generate" work for PIV cards.Werner Koch1-1/+2
* 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 <[email protected]>
2019-02-07card: Print the used algorithm of all keys.Werner Koch1-0/+2
* tools/card-call-scd.c (scd_readkey): New. * tools/card-tool-misc.c (pubkey_algo_string): New. * tools/gpg-card-tool.c (list_one_kinfo): Print the algo. -- It is convenient to see the actual algorithm of keys even if no certificate has yet been created. Signed-off-by: Werner Koch <[email protected]>
2019-02-05scd: Allow standard keyref scheme for app-openpgp.Werner Koch1-1/+1
* scd/app-openpgp.c (do_change_pin): Allow prefixing the CHVNO with "OPENPGP." * tools/card-call-scd.c (scd_change_pin): Change API to use strings. * tools/gpg-card-tool.c (cmd_passwd): Adjust for change. (cmd_unblock): Ditto. -- The generic keyref allows for better error detection in case a keyref is send to a wrong card. Signed-off-by: Werner Koch <[email protected]>
2019-01-31card: Implement non-interactive mode.Werner Koch1-0/+2
* 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 <[email protected]>
2019-01-31card: New command 'authenticate'.Werner Koch1-0/+1
* tools/card-tool-misc.c (hex_to_buffer): New. * tools/gpg-card-tool.c (get_data_from_file): Change to allow returning a string. (cmd_authenticate): New. (cmds): Add command "authenticate". Signed-off-by: Werner Koch <[email protected]>
2019-01-30card: Cache the results from gpg and gpgsm.Werner Koch1-0/+1
* tools/card-tool-keys.c (keyblock_cache): New var. (release_keyblock): Factor code out to a new do_release_keyblock. Add a cache. (flush_keyblock_cache): New. (get_matching_keys): Use the cache. * tools/gpg-card-tool.c (cmds): Add command "reset". (interactive_loop): Implement reset. -- Signed-off-by: Werner Koch <[email protected]>
2019-01-30card: Print matching OpenPGP and X.509 data.Werner Koch1-3/+45
* tools/card-tool-keys.c: New. * tools/Makefile.am (gpg_card_tool_SOURCES): Add file. * tools/card-tool.h (struct pubkey_s, pubkey_t): New. (struct userid_s, userid_t): New. (struct keyblock_s, keyblock_t): New. * common/util.h (GNUPG_PROTOCOL_): New const * tools/gpg-card-tool.c (aTest): Add temporary command. (list_one_kinfo): Print info from gpg and gpgsm. Signed-off-by: Werner Koch <[email protected]>
2019-01-29card: Support factory reset for Yubikey PIV application.Werner Koch1-0/+2
* scd/app-common.h (struct app_ctx_s): Add field cardtype. * scd/app.c (app_new_register): Set cardtype for yubikey. (app_getattr): Add CARDTYPE. (app_write_learn_status): Emit new attribute. * scd/app-piv.c (do_getattr): Add CHV-USAGE. (do_learn_status): Emit it. * tools/card-tool.h (struct card_info_s): Add field cardtype. * tools/card-call-scd.c (learn_status_cb): Parse "CARDTYPE". * tools/gpg-card-tool.c (list_piv): Print PIN usage policy. (list_card): Print card type. (cmd_factoryreset): Implement for Yubikey with PIV. Signed-off-by: Werner Koch <[email protected]>
2019-01-29card: Print keyinfo for PIV cards.Werner Koch1-5/+5
* scd/app-piv.c (do_learn_status): Print CHV-STATUS. * tools/card-tool.h (struct card_info_s): Rename chvretry to chvinfo. * tools/card-call-scd.c (learn_status_cb): Depend CHV-STATUS on app type. * tools/gpg-card-tool.c (list_piv): New. Signed-off-by: Werner Koch <[email protected]>
2019-01-29card: Make printing of key information more flexible.Werner Koch1-12/+25
* tools/card-tool-misc.c: New. * tools/card-tool.h: Rewored data structures for key infos. * tools/gpg-card-tool.c: Ditto. * tools/card-call-scd.c: Ditto. -- Note that this also changes the way the key information is printed. Formerly we printed it like: Signature key ....: <openpgp-fingerprint> created ....: <timestamp> keygrip ... : <keygrip> now we do: Signature key ....: <keygrip> fingerprint : <openpgp-fingerprint> created ....: <timestamp> This is because a keygrip is always available but a fingerprint and the creation date are properties of an OpenPGP card. A standard way of listing keys is better than one depending on the type of card. Signed-off-by: Werner Koch <[email protected]>
2019-01-27card: Implement the bulk of OpenPGP stuff into gpg-card-tool.Werner Koch1-0/+161
* tools/card-call-scd.c: New. * tools/card-tool.h: new. * tools/gpg-card-tool.c: Largely extended. -- gpg-card-tool will eventually replace the --card-edit command of gpg because it makes more sense to have a multi-protocol aware tool and not just one for OpenPGP cards. Most OpenPGP card things works now but a few, those which require close interaction with gpg, still need to be implemented. And of course the whole planned non-interactive stuff needs to be written. Signed-off-by: Werner Koch <[email protected]>