Last change
on this file since 8200a9c was
461541a,
checked in by Mei <mei@…>, 11 years ago
|
1) updated original rt0 to remove libstrongswan dependency
a) identity credential being made/accessed with openssl api calls
(X509/EVP_PKEY pem)
b) attribute credential being made/access via xmlsec1 (custom XML
structure)
2) refactored libcreddy into libabac and now one ABAC namespace for
libabac
3) added attribute_rule suboption to creddy's attribute as another way
to insert access rule
4) added some regression tests into example directory
5) updated some docs.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifndef __CREDDY_COMMON_H__ |
---|
2 | #define __CREDDY_COMMON_H__ |
---|
3 | |
---|
4 | /* used locally by creddy */ |
---|
5 | |
---|
6 | #include <stdlib.h> |
---|
7 | |
---|
8 | |
---|
9 | typedef struct _subject_t { |
---|
10 | char *cert; |
---|
11 | char *id; |
---|
12 | char *role; |
---|
13 | } subject_t; |
---|
14 | |
---|
15 | typedef struct _options_t { |
---|
16 | int help; |
---|
17 | int mode; |
---|
18 | |
---|
19 | char *cert; |
---|
20 | |
---|
21 | // generate options |
---|
22 | char *cn; |
---|
23 | int validity; |
---|
24 | |
---|
25 | // attribute options |
---|
26 | char *issuer; |
---|
27 | char *key; |
---|
28 | char *role; |
---|
29 | subject_t *subjects; |
---|
30 | int num_subjects; |
---|
31 | char *out; |
---|
32 | |
---|
33 | // verify options |
---|
34 | char *attrcert; |
---|
35 | |
---|
36 | // attribute_rule options |
---|
37 | char *attrrule; |
---|
38 | |
---|
39 | // display options |
---|
40 | char *show; |
---|
41 | } options_t; |
---|
42 | |
---|
43 | #define MODE_GENERATE 1 |
---|
44 | #define MODE_VERIFY 2 |
---|
45 | #define MODE_KEYID 3 |
---|
46 | #define MODE_ATTRIBUTE 4 |
---|
47 | #define MODE_ROLES 5 |
---|
48 | #define MODE_VERSION 6 |
---|
49 | #define MODE_DISPLAY 7 |
---|
50 | |
---|
51 | void usage(options_t *opts); |
---|
52 | void *xmalloc(size_t len); |
---|
53 | void *xrealloc(void *ptr, size_t size); |
---|
54 | char *xstrdup(char *string); |
---|
55 | |
---|
56 | // sub programs |
---|
57 | void generate_main(options_t *opts); |
---|
58 | void keyid_main(options_t *opts); |
---|
59 | void attribute_main(options_t *opts); |
---|
60 | void attribute_rule_main(options_t *opts); |
---|
61 | void roles_main(options_t *opts); |
---|
62 | void verify_main(options_t *opts); |
---|
63 | void display_main(options_t *opts); |
---|
64 | |
---|
65 | #endif /* __CREDDY_COMMON_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.