mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-17 14:07:03 +01:00
Print the card's S/N in a secret key listing.
This commit is contained in:
parent
9d6a2a60c2
commit
7d92a25561
@ -1,3 +1,7 @@
|
||||
2009-04-02 Werner Koch <wk@g10code.com>
|
||||
|
||||
* keylist.c (list_cert_std): Print card serial number.
|
||||
|
||||
2009-04-01 Werner Koch <wk@g10code.com>
|
||||
|
||||
* export.c (popen_protect_tool): Add command line option
|
||||
|
10
sm/keylist.c
10
sm/keylist.c
@ -1039,7 +1039,6 @@ list_cert_std (ctrl_t ctrl, ksba_cert_t cert, estream_t fp, int have_secret,
|
||||
const char *oid;
|
||||
const unsigned char *cert_der = NULL;
|
||||
|
||||
(void)have_secret;
|
||||
|
||||
es_fprintf (fp, " ID: 0x%08lX\n",
|
||||
gpgsm_get_short_fingerprint (cert, NULL));
|
||||
@ -1215,7 +1214,16 @@ list_cert_std (ctrl_t ctrl, ksba_cert_t cert, estream_t fp, int have_secret,
|
||||
es_fprintf (fp, " fingerprint: %s\n", dn?dn:"error");
|
||||
xfree (dn);
|
||||
|
||||
if (have_secret)
|
||||
{
|
||||
char *cardsn;
|
||||
|
||||
p = gpgsm_get_keygrip_hexstring (cert);
|
||||
if (!gpgsm_agent_keyinfo (ctrl, p, &cardsn) && cardsn)
|
||||
es_fprintf (fp, " card s/n: %s\n", cardsn);
|
||||
xfree (cardsn);
|
||||
xfree (p);
|
||||
}
|
||||
|
||||
if (with_validation)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user