-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfitsec_cert_db.h
40 lines (33 loc) · 1.18 KB
/
fitsec_cert_db.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef fitsec_cert_db_h
#define fitsec_cert_db_h
#include "fitsec.h"
typedef struct FSCertDB FSCertDB;
typedef enum {
FSCERTDB_CA,
FSCERTDB_AT,
FSCERTDB_OTHERS,
_FSCERTDB_MAX
}FSCertDBId;
FITSEC_EXPORT
FSCertificate * FSCertDB_Add (FitSec * e, FSCertDBId db, FSCertificate * c);
FITSEC_EXPORT
FSCertificate * FSCertDB_Find(FitSec * e, FSCertDBId db, FSHashedId8 digest);
FITSEC_EXPORT
FSCertificate * FSCertDB_Get (FitSec * e, FSCertDBId db, FSHashedId8 digest);
FITSEC_EXPORT
void FSCertDB_Del (FitSec * e, FSCertDBId db, FSCertificate * c);
FITSEC_EXPORT
void FSCertDB_Clean(FitSec * e, FSCertDBId db);
FITSEC_EXPORT
void FSCertDB_Relink(FitSec * e, FSCertDBId db);
FITSEC_EXPORT
void FSCertDB_Splay(FSCertificate *c);
#define FSCertDB_ForEach(e,db,c) \
for(void * __last_ ## c, *c = _FSCertDB_NextNode_Init(e, db, &__last_ ## c); \
c; \
c = _FSCertDB_NextNode(c, &__last_ ## c))
FITSEC_EXPORT
FSCertificate * _FSCertDB_NextNode_Init(FitSec * e, FSCertDBId db, void ** px);
FITSEC_EXPORT
FSCertificate * _FSCertDB_NextNode(const FSCertificate * c, void ** px);
#endif