1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

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
This commit is contained in:
Werner Koch 2022-01-18 08:03:27 +01:00
parent ec4a1cffb8
commit 38e100acb7
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 38 additions and 2 deletions

View file

@ -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);