/** tt.c **/ #include #include #include #include extern void abac_print_cred_info(abac_credential_t*, FILE*); extern char *abac_id_keyid(abac_id_t *id); extern abac_attribute_t *abac_attribute_add_tail(abac_attribute_t *ptr, abac_aspect_t *); int main(int argc, char **argv) { int i, success=0; abac_credential_t *cred=NULL; abac_credential_t **credentials=NULL; abac_context_t *ctx = abac_context_new(); if(argc != 4) return 1; /* build up structure */ abac_id_t *id =NULL; id = abac_id_from_file(argv[2]); int rc=abac_id_load_privkey_file(id,argv[3]); int w=atoi(argv[1]); if(w==0) { printf("USING chunk...\n"); rc=abac_context_load_id_privkey_chunk(ctx, abac_id_cert_chunk(id), abac_id_privkey_chunk(id)); } else { printf("USING NO chunk...\n"); rc=abac_context_load_id_id(ctx, id); } show_yap_db("dump_yap"); abac_context_free(ctx); return 0; }