source: libabac/prover_plus.cc @ e96c107

abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0mei_rt2mei_rt2_fix_1meiyap-rt1meiyap1rt2tvf-new-xml
Last change on this file since e96c107 was e96c107, checked in by Mike Ryan <mikeryan@…>, 14 years ago

match example keystore

  • Property mode set to 100644
File size: 834 bytes
Line 
1#include <err.h>
2#include <stdio.h>
3#include <vector>
4
5#include <abac.hh>
6
7using namespace ABAC;
8using std::vector;
9
10int main(int argc, char **argv) {
11    int i;
12    abac_credential_t *cred;
13
14    if (argc < 2)
15        errx(1, "Usage: %s <keystore>", argv[0]);
16
17    libabac_init();
18
19    Context ctx;
20    ctx.load_directory(argv[1]);
21
22    bool success;
23    vector<Credential> credentials = ctx.query(
24        "06df985dc065fc69b508f6afa8dd127cd29ccc62.fed_create",
25        "ef3584d91703acc4d9cb0f1f0950a31fc89e0b4c",
26        success
27    );
28
29    if (success)
30        puts("success");
31    for (vector<Credential>::iterator i = credentials.begin(); i != credentials.end(); ++i) {
32        printf("credential %s <- %s\n",
33            i->head().string(),
34            i->tail().string()
35        );
36    }
37
38    libabac_deinit();
39
40    return 0;
41}
Note: See TracBrowser for help on using the repository browser.