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
RevLine 
[64fa9ba]1#include <err.h>
2#include <stdio.h>
[9dffbd6]3#include <vector>
[64fa9ba]4
[6ede88c]5#include <abac.hh>
[64fa9ba]6
7using namespace ABAC;
[9dffbd6]8using std::vector;
[64fa9ba]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
[4e426c9]22    bool success;
[9dffbd6]23    vector<Credential> credentials = ctx.query(
[e96c107]24        "06df985dc065fc69b508f6afa8dd127cd29ccc62.fed_create",
25        "ef3584d91703acc4d9cb0f1f0950a31fc89e0b4c",
[4e426c9]26        success
[64fa9ba]27    );
28
[4e426c9]29    if (success)
30        puts("success");
[9dffbd6]31    for (vector<Credential>::iterator i = credentials.begin(); i != credentials.end(); ++i) {
[64fa9ba]32        printf("credential %s <- %s\n",
[2af3b82]33            i->head().string(),
34            i->tail().string()
[64fa9ba]35        );
36    }
37
38    libabac_deinit();
39
40    return 0;
41}
Note: See TracBrowser for help on using the repository browser.