diff --git a/sm/ChangeLog b/sm/ChangeLog index a988a200f..6936128de 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog @@ -1,3 +1,7 @@ +2009-04-02 Werner Koch + + * keylist.c (list_cert_std): Print card serial number. + 2009-04-01 Werner Koch * export.c (popen_protect_tool): Add command line option diff --git a/sm/keylist.c b/sm/keylist.c index 2de1708a8..2ea722370 100644 --- a/sm/keylist.c +++ b/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) {