blob: bb935fa89edbea203ce2b46c0524f574fd6eee5c [file] [log] [blame]
akmhoque7c64d802013-03-05 10:18:37 -06001#ifndef _NLSR_KM_H_
2#define _NLSR_KM_H_
3
4enum key_type{
5 ROOT_KEY, //0
6 SITE_KEY, //1
7 OPERATOR_KEY,//2
8 ROUTING_KEY,//3
9 NLSR_KEY,//4
10 UNKNOWN_KEY//5
11};
12
13
14
15
16int
17sign_content_with_user_defined_keystore(struct ccn_charbuf *content_name,
18 struct ccn_charbuf *resultbuf,
19 const void *data,
20 size_t data_size,
21 char *keystore_path,
22 char *keystore_passphrase,
23 char *key_repo_name,
24 char *site_name,
25 char *router_name);
26
27int contain_key_name(const unsigned char *ccnb,
28 struct ccn_parsed_ContentObject *pco);
29struct ccn_charbuf * get_key_name(const unsigned char *ccnb,
30 struct ccn_parsed_ContentObject *pco);
31
akmhoque6e2ba842013-03-05 19:35:26 -060032int verify_key(const unsigned char *ccnb,
akmhoqueb7958182013-03-11 12:03:54 -050033 struct ccn_parsed_ContentObject *pco,
34 int content_type);
akmhoque7c64d802013-03-05 10:18:37 -060035
36#endif