mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
card: New command "yubikey".
* 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 <wk@gnupg.org>
This commit is contained in:
parent
43b14b4cc2
commit
7e1cd2cd41
6 changed files with 580 additions and 50 deletions
|
@ -192,12 +192,16 @@ gpg_error_t test_get_matching_keys (const char *hexgrip);
|
|||
/*-- card-tool-misc.c --*/
|
||||
key_info_t find_kinfo (card_info_t info, const char *keyref);
|
||||
void *hex_to_buffer (const char *string, size_t *r_length);
|
||||
gpg_error_t send_apdu (const char *hexapdu, const char *desc,
|
||||
unsigned int ignore,
|
||||
unsigned char **r_data, size_t *r_datalen);
|
||||
|
||||
/*-- card-call-scd.c --*/
|
||||
void release_card_info (card_info_t info);
|
||||
const char *app_type_string (app_type_t app_type);
|
||||
|
||||
gpg_error_t scd_apdu (const char *hexapdu, unsigned int *r_sw);
|
||||
gpg_error_t scd_apdu (const char *hexapdu, unsigned int *r_sw,
|
||||
unsigned char **r_data, size_t *r_datalen);
|
||||
gpg_error_t scd_learn (card_info_t info);
|
||||
gpg_error_t scd_getattr (const char *name, struct card_info_s *info);
|
||||
gpg_error_t scd_setattr (const char *name,
|
||||
|
@ -218,6 +222,8 @@ gpg_error_t scd_checkpin (const char *serialno);
|
|||
|
||||
unsigned long agent_get_s2k_count (void);
|
||||
|
||||
/*-- card-tool-yubikey.c --*/
|
||||
gpg_error_t yubikey_commands (estream_t fp, int argc, char *argv[]);
|
||||
|
||||
|
||||
#endif /*GNUPG_CARD_TOOL_H*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue