scd:p15: Show the ATR as part of the TokenInfo diagnostics.

* scd/app-p15.c (read_ef_tokeninfo): Print the ATR in verbose mode.
--

It is convenient to see the ATR close to the other info,

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2021-01-21 10:44:43 +01:00
parent 9500432b7a
commit 60499d9894
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 12 additions and 0 deletions

View File

@ -2553,6 +2553,18 @@ read_ef_tokeninfo (app_t app)
if (opt.verbose)
{
unsigned char *atr;
size_t atrlen;
log_info ("p15: atr ..........: ");
atr = apdu_get_atr (app_get_slot (app), &atrlen);
if (!atr)
log_printf ("[error]\n");
else
{
log_printhex (atr, atrlen, "");
xfree (atr);
}
log_info ("p15: cardtype .....: %d.%d\n",
app->app_local->card_type,
app->app_local->card_product);