diff options
author | Werner Koch <[email protected]> | 2009-01-13 14:01:56 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2009-01-13 14:01:56 +0000 |
commit | 38251aa74f92134ac164a0090b70e4a6bc2a0519 (patch) | |
tree | 7893cf1a25613e1b54b8c577bd406bc0ce9a9327 /g10/card-util.c | |
parent | Post release updates (diff) | |
download | gnupg-38251aa74f92134ac164a0090b70e4a6bc2a0519.tar.gz gnupg-38251aa74f92134ac164a0090b70e4a6bc2a0519.zip |
Add a sample key.
Detect and show the card type.
Diffstat (limited to 'g10/card-util.c')
-rw-r--r-- | g10/card-util.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/g10/card-util.c b/g10/card-util.c index e25427f51..24a7b094b 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -369,8 +369,29 @@ card_status (FILE *fp, char *serialno, size_t serialnobuflen) if (!info.serialno || strncmp (info.serialno, "D27600012401", 12) || strlen (info.serialno) != 32 ) { - if (opt.with_colons) - fputs ("unknown:\n", fp); + if (info.apptype && !strcmp (info.apptype, "NKS")) + { + if (opt.with_colons) + fputs ("netkey-card:\n", fp); + log_info ("this is a NetKey card\n"); + } + else if (info.apptype && !strcmp (info.apptype, "DINSIG")) + { + if (opt.with_colons) + fputs ("dinsig-card:\n", fp); + log_info ("this is a DINSIG compliant card\n"); + } + else if (info.apptype && !strcmp (info.apptype, "P15")) + { + if (opt.with_colons) + fputs ("pkcs15-card:\n", fp); + log_info ("this is a PKCS#15 compliant card\n"); + } + else + { + if (opt.with_colons) + fputs ("unknown:\n", fp); + } log_info ("not an OpenPGP card\n"); agent_release_card_info (&info); xfree (pk); |