diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2017-05-30 20:59:31 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2017-05-30 20:59:31 +0200 |
commit | bba25e2ff6c4a193acb54560ea4417537bd2954e (patch) | |
tree | 9e074fe343f9ab6f5ce1e9c5142d9a6cf180fcda /src/pki/commands/signcrl.c | |
parent | 05ddd767992d68bb38c7f16ece142e8c2e9ae016 (diff) | |
download | vyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.tar.gz vyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.zip |
New upstream version 5.5.3
Diffstat (limited to 'src/pki/commands/signcrl.c')
-rw-r--r-- | src/pki/commands/signcrl.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/pki/commands/signcrl.c b/src/pki/commands/signcrl.c index 6bccf1b09..25a3aac52 100644 --- a/src/pki/commands/signcrl.c +++ b/src/pki/commands/signcrl.c @@ -61,16 +61,24 @@ static void revoked_destroy(revoked_t *revoked) free(revoked); } -/** - * Filter for revoked enumerator - */ -static bool filter(void *data, revoked_t **revoked, chunk_t *serial, void *p2, - time_t *date, void *p3, crl_reason_t *reason) +CALLBACK(filter, bool, + void *data, enumerator_t *orig, va_list args) { - *serial = (*revoked)->serial; - *date = (*revoked)->date; - *reason = (*revoked)->reason; - return TRUE; + revoked_t *revoked; + crl_reason_t *reason; + chunk_t *serial; + time_t *date; + + VA_ARGS_VGET(args, serial, date, reason); + + if (orig->enumerate(orig, &revoked)) + { + *serial = revoked->serial; + *date = revoked->date; + *reason = revoked->reason; + return TRUE; + } + return FALSE; } /** @@ -392,7 +400,7 @@ static int sign_crl() chunk_increment(crl_serial); enumerator = enumerator_create_filter(list->create_enumerator(list), - (void*)filter, NULL, NULL); + filter, NULL, NULL); crl = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509_CRL, BUILD_SIGNING_KEY, private, BUILD_SIGNING_CERT, ca, BUILD_SERIAL, crl_serial, |