source: creddy/creddy.h @ cfcdfd29

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
Line 
1#ifndef __CREDDY_H__
2#define __CREDDY_H__
3
4#include <library.h>
5#include <credentials/certificates/certificate.h>
6#include <credentials/certificates/x509.h>
7
8typedef struct _options_t {
9    int help;
10    int mode;
11
12    char *cert;
13
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
26int clean_name(char *string);
27
28// load an ID cert from file (aborts on fail)
29certificate_t *cert_from_file(char *filename);
30
31// get the keyid from a cert (free result when done)
32char *cert_keyid(certificate_t *cert);
33
34void usage(options_t *opts);
35void *xmalloc(size_t len);
36char *xstrdup(char *string);
37
38// sub programs
39void generate_main(options_t *opts);
40void keyid_main(options_t *opts);
41
42#endif /* __CREDDY_H__ */
Note: See TracBrowser for help on using the repository browser.