|
Electroneum
|

Go to the source code of this file.
Classes | |
| struct | val_anchors |
| struct | ta_key |
| struct | trust_anchor |
Functions | |
| struct val_anchors * | anchors_create (void) |
| void | anchors_delete (struct val_anchors *anchors) |
| int | anchors_apply_cfg (struct val_anchors *anchors, struct config_file *cfg) |
| void | anchors_init_parents_locked (struct val_anchors *anchors) |
| struct trust_anchor * | anchors_lookup (struct val_anchors *anchors, uint8_t *qname, size_t qname_len, uint16_t qclass) |
| struct trust_anchor * | anchor_find (struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass) |
| struct trust_anchor * | anchor_store_str (struct val_anchors *anchors, struct sldns_buffer *buffer, const char *str) |
| size_t | anchors_get_mem (struct val_anchors *anchors) |
| int | anchor_cmp (const void *k1, const void *k2) |
| int | anchors_add_insecure (struct val_anchors *anchors, uint16_t c, uint8_t *nm) |
| void | anchors_delete_insecure (struct val_anchors *anchors, uint16_t c, uint8_t *nm) |
| size_t | anchor_list_keytags (struct trust_anchor *ta, uint16_t *list, size_t num) |
| int | anchor_has_keytag (struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass, uint16_t keytag) |
This file contains storage for the trust anchors for the validator.
Definition in file val_anchor.h.
| int anchor_cmp | ( | const void * | k1, |
| const void * | k2 | ||
| ) |
compare two trust anchors
| struct trust_anchor* anchor_find | ( | struct val_anchors * | anchors, |
| uint8_t * | name, | ||
| int | namelabs, | ||
| size_t | namelen, | ||
| uint16_t | dclass | ||
| ) |
Find a trust anchor. Exact matching.
| anchors | anchor storage. |
| name | name of trust anchor (wireformat) |
| namelabs | labels in name |
| namelen | length of name |
| dclass | class of trust anchor |
| int anchor_has_keytag | ( | struct val_anchors * | anchors, |
| uint8_t * | name, | ||
| int | namelabs, | ||
| size_t | namelen, | ||
| uint16_t | dclass, | ||
| uint16_t | keytag | ||
| ) |
Check if there is a trust anchor for given zone with this keytag.
| anchors | anchor storage |
| name | name of trust anchor (wireformat) |
| namelabs | labels in name |
| namelen | length of name |
| dclass | class of trust anchor |
| keytag | keytag |
| size_t anchor_list_keytags | ( | struct trust_anchor * | ta, |
| uint16_t * | list, | ||
| size_t | num | ||
| ) |
Get a list of keytags for the trust anchor. Zero tags for insecure points.
| ta | trust anchor (locked by caller). |
| list | array of uint16_t. |
| num | length of array. |
| struct trust_anchor* anchor_store_str | ( | struct val_anchors * | anchors, |
| struct sldns_buffer * | buffer, | ||
| const char * | str | ||
| ) |
Store one string as trust anchor RR.
| anchors | anchor storage. |
| buffer | parsing buffer, to generate the RR wireformat in. |
| str | string. |
| int anchors_add_insecure | ( | struct val_anchors * | anchors, |
| uint16_t | c, | ||
| uint8_t * | nm | ||
| ) |
Add insecure point trust anchor. For external use (locks and init_parents)
| anchors | anchor storage. |
| c | class. |
| nm | name of insecure trust point. |
| int anchors_apply_cfg | ( | struct val_anchors * | anchors, |
| struct config_file * | cfg | ||
| ) |
Process trust anchor config.
| anchors | struct anchor storage |
| cfg | config options. |
| struct val_anchors* anchors_create | ( | void | ) |
Create trust anchor storage
| void anchors_delete | ( | struct val_anchors * | anchors | ) |
Delete trust anchor storage.
| anchors | to delete. |
| void anchors_delete_insecure | ( | struct val_anchors * | anchors, |
| uint16_t | c, | ||
| uint8_t * | nm | ||
| ) |
Delete insecure point trust anchor. Does not remove if no such point. For external use (locks and init_parents)
| anchors | anchor storage. |
| c | class. |
| nm | name of insecure trust point. |
| size_t anchors_get_mem | ( | struct val_anchors * | anchors | ) |
Get memory in use by the trust anchor storage
| anchors | anchor storage. |
| void anchors_init_parents_locked | ( | struct val_anchors * | anchors | ) |
Recalculate parent pointers. The caller must hold the lock on the anchors structure (say after removing an item from the rbtree). Caller must not hold any locks on trust anchors. After the call is complete the parent pointers are updated and an item just removed is no longer referenced in parent pointers.
| anchors | the structure to update. |
| struct trust_anchor* anchors_lookup | ( | struct val_anchors * | anchors, |
| uint8_t * | qname, | ||
| size_t | qname_len, | ||
| uint16_t | qclass | ||
| ) |
Given a qname/qclass combination, find the trust anchor closest above it. Or return NULL if none exists.
| anchors | struct anchor storage |
| qname | query name, uncompressed wireformat. |
| qname_len | length of qname. |
| qclass | class to query for. |