mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg,tools: Fix detecting OpenPGP card by serialno.
* tools/gpg-card.c (list_openpgp): Use ->apptype to determine card's APP. * g10/card-util.c (get_info_for_key_operation): Likewise. (current_card_status): Even if its SERIALNO is not like OpenPGP card, it's OpenPGP card when app says so. -- GnuPG-bug-id: 5100 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
31def32eee
commit
157f1de64e
2 changed files with 6 additions and 7 deletions
|
@ -841,9 +841,7 @@ list_openpgp (card_info_t info, estream_t fp, int no_key_lookup)
|
|||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
if (!info->serialno
|
||||
|| strncmp (info->serialno, "D27600012401", 12)
|
||||
|| strlen (info->serialno) != 32 )
|
||||
if (info->apptype != APP_TYPE_OPENPGP)
|
||||
{
|
||||
tty_fprintf (fp, "invalid OpenPGP card\n");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue