diff options
author | NIIBE Yutaka <[email protected]> | 2020-10-26 04:49:23 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2020-10-26 04:49:23 +0000 |
commit | 157f1de64e437cecd75335e9f4077ba9835e3da0 (patch) | |
tree | b0cb5d922a2077c3cebcf41853619e9fde38d0de /tools/gpg-card.c | |
parent | scd: Internal CCID driver thing only for SPR532. (diff) | |
download | gnupg-157f1de64e437cecd75335e9f4077ba9835e3da0.tar.gz gnupg-157f1de64e437cecd75335e9f4077ba9835e3da0.zip |
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 <[email protected]>
Diffstat (limited to 'tools/gpg-card.c')
-rw-r--r-- | tools/gpg-card.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/gpg-card.c b/tools/gpg-card.c index ba48905e2..7c30ad3aa 100644 --- a/tools/gpg-card.c +++ b/tools/gpg-card.c @@ -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; |