diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2008-05-23 14:24:24 +0000 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2008-05-23 14:24:24 +0000 |
commit | 0672aa7b0ea3b2220862dd43baee7283985237c6 (patch) | |
tree | 8ca92b2f207739330ccbf7f1694a8f9aa886a838 /src/charon | |
parent | 8cc16c9d9e0668931fecdb4a8f4d41559a8e2584 (diff) | |
download | strongswan-0672aa7b0ea3b2220862dd43baee7283985237c6.tar.bz2 strongswan-0672aa7b0ea3b2220862dd43baee7283985237c6.tar.xz |
added display of holderIssuer, holderSerial, and authorityKeyIdentifier
Diffstat (limited to 'src/charon')
-rw-r--r-- | src/charon/plugins/stroke/stroke_list.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/charon/plugins/stroke/stroke_list.c b/src/charon/plugins/stroke/stroke_list.c index be4570916..db9d829e1 100644 --- a/src/charon/plugins/stroke/stroke_list.c +++ b/src/charon/plugins/stroke/stroke_list.c @@ -20,6 +20,7 @@ #include <daemon.h> #include <utils/linked_list.h> #include <credentials/certificates/x509.h> +#include <credentials/certificates/ac.h> #include <credentials/certificates/crl.h> /* warning intervals for list functions */ @@ -471,6 +472,13 @@ static void stroke_list_acerts(linked_list_t *list, bool utc, FILE *out) while (enumerator->enumerate(enumerator, (void**)&cert)) { + ac_t *ac = (ac_t*)cert; + chunk_t serial = ac->get_serial(ac); + chunk_t holderSerial = ac->get_holderSerial(ac); + identification_t *holderIssuer = ac->get_holderIssuer(ac); + identification_t *authkey = ac->get_authKeyIdentifier(ac); + identification_t *entityName = cert->get_subject(cert); + if (first) { fprintf(out, "\n"); @@ -479,8 +487,20 @@ static void stroke_list_acerts(linked_list_t *list, bool utc, FILE *out) } fprintf(out, "\n"); - fprintf(out, " holder: \"%D\"\n", cert->get_subject(cert)); + if (entityName) + { + fprintf(out, " holder: \"%D\"\n", entityName); + } + if (holderIssuer) + { + fprintf(out, " hissuer: \"%D\"\n", holderIssuer); + } + if (holderSerial.ptr) + { + fprintf(out, " hserial: %#B\n", &holderSerial); + } fprintf(out, " issuer: \"%D\"\n", cert->get_issuer(cert)); + fprintf(out, " serial: %#B\n", &serial); /* list validity */ cert->get_validity(cert, &now, &thisUpdate, &nextUpdate); @@ -499,6 +519,12 @@ static void stroke_list_acerts(linked_list_t *list, bool utc, FILE *out) } fprintf(out, " \n"); } + + /* list optional authorityKeyIdentifier */ + if (authkey) + { + fprintf(out, " authkey: %D\n", authkey); + } } enumerator->destroy(enumerator); } |