aboutsummaryrefslogtreecommitdiffstats
path: root/src/pki/commands/print.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-12-17 17:00:32 +0100
committerMartin Willi <martin@revosec.ch>2011-01-05 16:46:04 +0100
commitde8521f6f2d046ecb8cc71d722836e0dc0e2e194 (patch)
tree3c16e6480e467d6887c608b12521643f18635776 /src/pki/commands/print.c
parent55e4d8982fd728a60a2cabfda1b2eac240a19ce7 (diff)
downloadstrongswan-de8521f6f2d046ecb8cc71d722836e0dc0e2e194.tar.bz2
strongswan-de8521f6f2d046ecb8cc71d722836e0dc0e2e194.tar.xz
Added support for delta CRLs to pki tool
Diffstat (limited to 'src/pki/commands/print.c')
-rw-r--r--src/pki/commands/print.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/pki/commands/print.c b/src/pki/commands/print.c
index f0795ea2c..185895ec2 100644
--- a/src/pki/commands/print.c
+++ b/src/pki/commands/print.c
@@ -318,14 +318,41 @@ static void print_crl(crl_t *crl)
crl_reason_t reason;
chunk_t chunk;
int count = 0;
+ bool first;
char buf[64];
struct tm tm;
+ x509_cdp_t *cdp;
chunk = crl->get_serial(crl);
printf("serial: %#B\n", &chunk);
+ if (crl->is_delta_crl(crl, &chunk))
+ {
+ printf("delta CRL: for serial %#B\n", &chunk);
+ }
chunk = crl->get_authKeyIdentifier(crl);
printf("authKeyId: %#B\n", &chunk);
+ first = TRUE;
+ enumerator = crl->create_delta_crl_uri_enumerator(crl);
+ while (enumerator->enumerate(enumerator, &cdp))
+ {
+ if (first)
+ {
+ printf("freshest: %s", cdp->uri);
+ first = FALSE;
+ }
+ else
+ {
+ printf(" %s", cdp->uri);
+ }
+ if (cdp->issuer)
+ {
+ printf(" (CRL issuer: %Y)", cdp->issuer);
+ }
+ printf("\n");
+ }
+ enumerator->destroy(enumerator);
+
enumerator = crl->create_enumerator(crl);
while (enumerator->enumerate(enumerator, &chunk, &ts, &reason))
{