Manages data structures for associating pairs of fingerprints. Used to handle combinations of identity/signing-key fingerprints for authorities.
More...
|
static int | fp_pair_map_entries_eq (const fp_pair_map_entry_t *a, const fp_pair_map_entry_t *b) |
|
static unsigned int | fp_pair_map_entry_hash (const fp_pair_map_entry_t *a) |
|
| HT_PROTOTYPE (fp_pair_map_impl, fp_pair_map_entry_t, node, fp_pair_map_entry_hash, fp_pair_map_entries_eq) |
|
| HT_GENERATE2 (fp_pair_map_impl, fp_pair_map_entry_t, node, fp_pair_map_entry_hash, fp_pair_map_entries_eq, 0.6, tor_reallocarray_, tor_free_) |
|
fp_pair_map_t * | fp_pair_map_new (void) |
|
void * | fp_pair_map_set (fp_pair_map_t *map, const fp_pair_t *key, void *val) |
|
void * | fp_pair_map_set_by_digests (fp_pair_map_t *map, const char *first, const char *second, void *val) |
|
void * | fp_pair_map_get (const fp_pair_map_t *map, const fp_pair_t *key) |
|
void * | fp_pair_map_get_by_digests (const fp_pair_map_t *map, const char *first, const char *second) |
|
void * | fp_pair_map_remove (fp_pair_map_t *map, const fp_pair_t *key) |
|
void | fp_pair_map_free_ (fp_pair_map_t *map, void(*free_val)(void *)) |
|
int | fp_pair_map_isempty (const fp_pair_map_t *map) |
|
int | fp_pair_map_size (const fp_pair_map_t *map) |
|
fp_pair_map_iter_t * | fp_pair_map_iter_init (fp_pair_map_t *map) |
|
fp_pair_map_iter_t * | fp_pair_map_iter_next (fp_pair_map_t *map, fp_pair_map_iter_t *iter) |
|
fp_pair_map_iter_t * | fp_pair_map_iter_next_rmv (fp_pair_map_t *map, fp_pair_map_iter_t *iter) |
|
void | fp_pair_map_iter_get (fp_pair_map_iter_t *iter, fp_pair_t *key_out, void **val_out) |
|
int | fp_pair_map_iter_done (fp_pair_map_iter_t *iter) |
|
void | fp_pair_map_assert_ok (const fp_pair_map_t *map) |
|
Manages data structures for associating pairs of fingerprints. Used to handle combinations of identity/signing-key fingerprints for authorities.
This is a nice, simple, compact data structure module that handles a map from (signing key fingerprint, identity key fingerprint) to void *. The fingerprints here are SHA1 digests of RSA keys.
This structure is used in directory.c and in routerlist.c for handling handling authority certificates, since we never want more than a single certificate for any (ID key, signing key) pair.
Definition in file fp_pair.c.