implemented listing of attribute certificates

This commit is contained in:
Andreas Steffen
2007-08-07 20:32:11 +00:00
parent 8f5b363c30
commit f51d505e5e
5 changed files with 138 additions and 5 deletions
@@ -38,6 +38,7 @@
#include <stroke.h>
#include <daemon.h>
#include <crypto/x509.h>
#include <crypto/ac.h>
#include <crypto/ca.h>
#include <crypto/crl.h>
#include <control/interface_manager.h>
@@ -1380,6 +1381,23 @@ static void stroke_list(stroke_msg_t *msg, FILE *out)
{
list_auth_certificates(AUTH_AA, "AA", msg->list.utc, out);
}
if (msg->list.flags & LIST_ACERTS)
{
x509ac_t *cert;
iterator = charon->credentials->create_acert_iterator(charon->credentials);
if (iterator->get_count(iterator))
{
fprintf(out, "\n");
fprintf(out, "List of X.509 Attribute Certificates:\n");
fprintf(out, "\n");
}
while (iterator->iterate(iterator, (void**)&cert))
{
cert->list(cert, out, msg->list.utc);
}
iterator->destroy(iterator);
}
if (msg->list.flags & LIST_CAINFOS)
{
ca_info_t *ca_info;