#include "creddy.h" #include void roles_main(options_t *opts) { if (opts->cert == NULL) usage(opts); certificate_t *cert = lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509_AC, BUILD_FROM_FILE, opts->cert, BUILD_END ); if (cert == NULL) errx(1, "Couldn't load attribute cert %s", opts->cert); ac_t *ac = (ac_t *)cert; ietf_attributes_t *attr = ac->get_groups(ac); if (attr == NULL) errx(1, "Couldn't get attributes from cert"); puts(attr->get_string(attr)); DESTROY_IF(attr); DESTROY_IF(cert); }