From 60499d98940d4b7a1673b8584cafe0f7ac2901dd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 21 Jan 2021 10:44:43 +0100 Subject: [PATCH] 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 --- scd/app-p15.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scd/app-p15.c b/scd/app-p15.c index fee04c448..ee7c9436d 100644 --- a/scd/app-p15.c +++ b/scd/app-p15.c @@ -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);