aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-01-21 09:44:43 +0000
committerWerner Koch <[email protected]>2021-01-21 09:44:43 +0000
commit60499d98940d4b7a1673b8584cafe0f7ac2901dd (patch)
treec6e16eaec5a071cfc4ed994b1c93444b115a862f
parentRequire Libgcrypt 1.9 (diff)
downloadgnupg-60499d98940d4b7a1673b8584cafe0f7ac2901dd.tar.gz
gnupg-60499d98940d4b7a1673b8584cafe0f7ac2901dd.zip
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 <[email protected]>
-rw-r--r--scd/app-p15.c12
1 files changed, 12 insertions, 0 deletions
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);