mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-12 22:11:29 +02:00
(list_cert_colon): Print the fingerprint as the
cert-id for root certificates.
This commit is contained in:
parent
cd3ccbf34d
commit
18a212f2c8
@ -1,3 +1,8 @@
|
|||||||
|
2004-02-24 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* keylist.c (list_cert_colon): Print the fingerprint as the
|
||||||
|
cert-id for root certificates.
|
||||||
|
|
||||||
2004-02-21 Werner Koch <wk@gnupg.org>
|
2004-02-21 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* keylist.c (list_internal_keys): Return error codes.
|
* keylist.c (list_internal_keys): Return error codes.
|
||||||
|
10
sm/keylist.c
10
sm/keylist.c
@ -249,21 +249,27 @@ list_cert_colon (ctrl_t ctrl, ksba_cert_t cert, unsigned int validity,
|
|||||||
|
|
||||||
/* FPR record */
|
/* FPR record */
|
||||||
fprintf (fp, "fpr:::::::::%s:::", fpr);
|
fprintf (fp, "fpr:::::::::%s:::", fpr);
|
||||||
xfree (fpr); fpr = NULL;
|
|
||||||
/* print chaining ID (field 13)*/
|
/* print chaining ID (field 13)*/
|
||||||
{
|
{
|
||||||
ksba_cert_t next;
|
ksba_cert_t next;
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (!gpgsm_walk_cert_chain (cert, &next))
|
rc = gpgsm_walk_cert_chain (cert, &next);
|
||||||
|
if (!rc) /* We known the issuer's certificate. */
|
||||||
{
|
{
|
||||||
p = gpgsm_get_fingerprint_hexstring (next, GCRY_MD_SHA1);
|
p = gpgsm_get_fingerprint_hexstring (next, GCRY_MD_SHA1);
|
||||||
fputs (p, fp);
|
fputs (p, fp);
|
||||||
xfree (p);
|
xfree (p);
|
||||||
ksba_cert_release (next);
|
ksba_cert_release (next);
|
||||||
}
|
}
|
||||||
|
else if (rc == -1) /* We reached the root certificate. */
|
||||||
|
{
|
||||||
|
fputs (fpr, fp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
putc (':', fp);
|
putc (':', fp);
|
||||||
putc ('\n', fp);
|
putc ('\n', fp);
|
||||||
|
xfree (fpr); fpr = NULL;
|
||||||
|
|
||||||
|
|
||||||
if (opt.with_key_data)
|
if (opt.with_key_data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user