abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0mei_rt2mei_rt2_fix_1meiyap-rt1meiyap1rt2tvf-new-xml
Last change
on this file since cfcdfd29 was
fd0febd,
checked in by Mike Ryan <mikeryan@…>, 14 years ago
|
creddy keyid
|
-
Property mode set to
100644
|
File size:
928 bytes
|
Rev | Line | |
---|
[abd7c25] | 1 | #ifndef __CREDDY_H__ |
---|
| 2 | #define __CREDDY_H__ |
---|
| 3 | |
---|
[fd0febd] | 4 | #include <library.h> |
---|
| 5 | #include <credentials/certificates/certificate.h> |
---|
| 6 | #include <credentials/certificates/x509.h> |
---|
| 7 | |
---|
[abd7c25] | 8 | typedef struct _options_t { |
---|
| 9 | int help; |
---|
| 10 | int mode; |
---|
| 11 | |
---|
[fd0febd] | 12 | char *cert; |
---|
| 13 | |
---|
[abd7c25] | 14 | // generate options |
---|
| 15 | char *cn; |
---|
| 16 | int validity; |
---|
| 17 | } options_t; |
---|
| 18 | |
---|
| 19 | #define MODE_GENERATE 1 |
---|
| 20 | #define MODE_VERIFY 2 |
---|
| 21 | #define MODE_KEYID 3 |
---|
| 22 | #define MODE_ATTRIBUTE 4 |
---|
| 23 | #define MODE_ROLES 5 |
---|
| 24 | |
---|
| 25 | // returns true if a name starts with a letter and is otherwise alphanumeric |
---|
| 26 | int clean_name(char *string); |
---|
| 27 | |
---|
[fd0febd] | 28 | // load an ID cert from file (aborts on fail) |
---|
| 29 | certificate_t *cert_from_file(char *filename); |
---|
| 30 | |
---|
| 31 | // get the keyid from a cert (free result when done) |
---|
| 32 | char *cert_keyid(certificate_t *cert); |
---|
| 33 | |
---|
[abd7c25] | 34 | void usage(options_t *opts); |
---|
| 35 | void *xmalloc(size_t len); |
---|
| 36 | char *xstrdup(char *string); |
---|
| 37 | |
---|
| 38 | // sub programs |
---|
| 39 | void generate_main(options_t *opts); |
---|
[fd0febd] | 40 | void keyid_main(options_t *opts); |
---|
[abd7c25] | 41 | |
---|
| 42 | #endif /* __CREDDY_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.