summaryrefslogtreecommitdiffstats
path: root/g10/call-agent.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2022-01-18 08:03:27 +0100
committerWerner Koch <wk@gnupg.org>2022-01-18 08:03:27 +0100
commit38e100acb7201010d46a50e6a371603373b2a30e (patch)
tree7a137791679ff86665abffd89780b410fd7f5d10 /g10/call-agent.c
parentgpgconf: Add command aliases -L -K -R. (diff)
downloadgnupg2-38e100acb7201010d46a50e6a371603373b2a30e.tar.xz
gnupg2-38e100acb7201010d46a50e6a371603373b2a30e.zip
gpg: Print Yubikey version correctly.
* g10/call-agent.c (learn_status_cb): Parse APPVERSION. * g10/call-agent.h (struct agent_card_info_s): Add field appversion. * g10/card-util.c (print_a_version): New. (current_card_status): Print version from appversion. -- This is a regression due to the PIV support. Note that the newer gpg-card worked correctly. GnuPG-bug-id: 5787
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r--g10/call-agent.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c
index 8f4e44b32..7c21a9a84 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -539,6 +539,13 @@ learn_status_cb (void *opaque, const char *line)
xfree (parm->apptype);
parm->apptype = unescape_status_string (line);
}
+ else if (keywordlen == 10 && !memcmp (keyword, "APPVERSION", keywordlen))
+ {
+ unsigned int val = 0;
+
+ sscanf (line, "%x", &val);
+ parm->appversion = val;
+ }
else if (keywordlen == 9 && !memcmp (keyword, "DISP-NAME", keywordlen))
{
xfree (parm->disp_name);