aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/call-agent.c8
-rw-r--r--g10/call-agent.h1
-rw-r--r--g10/card-util.c5
3 files changed, 13 insertions, 1 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index 634578461..8eb16e411 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -480,6 +480,7 @@ agent_release_card_info (struct agent_card_info_s *info)
if (!info)
return;
+ xfree (info->reader); info->reader = NULL;
xfree (info->serialno); info->serialno = NULL;
xfree (info->apptype); info->apptype = NULL;
xfree (info->disp_name); info->disp_name = NULL;
@@ -509,7 +510,12 @@ learn_status_cb (void *opaque, const char *line)
while (spacep (line))
line++;
- if (keywordlen == 8 && !memcmp (keyword, "SERIALNO", keywordlen))
+ if (keywordlen == 6 && !memcmp (keyword, "READER", keywordlen))
+ {
+ xfree (parm->reader);
+ parm->reader = unescape_status_string (line);
+ }
+ else if (keywordlen == 8 && !memcmp (keyword, "SERIALNO", keywordlen))
{
xfree (parm->serialno);
parm->serialno = store_serialno (line);
diff --git a/g10/call-agent.h b/g10/call-agent.h
index 70421dba4..fa1b88a29 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -23,6 +23,7 @@
struct agent_card_info_s
{
int error; /* private. */
+ char *reader; /* Reader information. */
char *apptype; /* Malloced application type string. */
char *serialno; /* malloced hex string. */
char *disp_name; /* malloced. */
diff --git a/g10/card-util.c b/g10/card-util.c
index b8c505423..7196031c4 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -387,6 +387,11 @@ card_status (estream_t fp, char *serialno, size_t serialnobuflen)
}
if (opt.with_colons)
+ es_fprintf (fp, "Reader:%s:", info.reader? info.reader : "");
+ else
+ tty_fprintf (fp, "Reader ...........: %s\n",
+ info.reader? info.reader : "[none]");
+ if (opt.with_colons)
es_fprintf (fp, "AID:%s:", info.serialno? info.serialno : "");
else
tty_fprintf (fp, "Application ID ...: %s\n",