1 /* Internal key index structure. */
8 typedef struct key_idx_s *key_idx_t;
10 /* Internal key cache to associate a key with an file offset. */
13 struct key_table_s *next;
16 typedef struct key_table_s *key_table_t;
18 typedef struct cdk_keydb_search_s
20 off_t off; /* last file offset */
23 char *pattern; /* A search is performed by pattern. */
24 u32 keyid[2]; /* A search by keyid. */
25 byte fpr[KEY_FPR_LEN]; /* A search by fingerprint. */
28 struct key_table_s *cache;
30 unsigned int no_cache:1; /* disable the index cache. */
33 char *idx_name; /* name of the index file or NULL. */
37 /* Internal key database handle. */
40 int type; /* type of the key db handle. */
41 int fp_ref; /* 1=means it is a reference and shall not be closed. */
43 char *name; /* name of the underlying file or NULL. */
44 unsigned int secret:1; /* contain secret keys. */
45 unsigned int isopen:1; /* the underlying stream is opened. */
47 /* structure to store some stats about the keydb. */
50 size_t new_keys; /* amount of new keys that were imported. */