#include "util/rbtree.h"
Data Structures | |
struct | val_anchors |
Trust anchor store. More... | |
struct | ta_key |
Trust anchor key. More... | |
struct | trust_anchor |
A trust anchor in the trust anchor store. More... | |
Functions | |
struct val_anchors * | anchors_create () |
Create trust anchor storage. | |
void | anchors_delete (struct val_anchors *anchors) |
Delete trust anchor storage. | |
int | anchors_apply_cfg (struct val_anchors *anchors, struct config_file *cfg) |
Process trust anchor config. | |
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. | |
struct trust_anchor * | anchor_find (struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass) |
Find a trust anchor. | |
struct trust_anchor * | anchor_store_str (struct val_anchors *anchors, ldns_buffer *buffer, const char *str) |
Store one string as trust anchor RR. | |
size_t | anchors_get_mem (struct val_anchors *anchors) |
Get memory in use by the trust anchor storage. | |
int | anchor_cmp (const void *k1, const void *k2) |
compare two trust anchors |
struct val_anchors* anchors_create | ( | ) | [read] |
Create trust anchor storage.
References anchor_cmp(), anchors_delete(), rbtree_create(), val_anchors::region, regional_create(), and val_anchors::tree.
Referenced by anchors_test(), and val_apply_cfg().
void anchors_delete | ( | struct val_anchors * | anchors | ) |
Delete trust anchor storage.
anchors,: | to delete. |
References val_anchors::region, regional_destroy(), and val_anchors::tree.
Referenced by anchors_create(), anchors_test(), and val_deinit().
int anchors_apply_cfg | ( | struct val_anchors * | anchors, | |
struct config_file * | cfg | |||
) |
Process trust anchor config.
anchors,: | struct anchor storage | |
cfg,: | config options. |
References anchor_read_bind_file_wild(), anchor_read_file(), anchor_store_str(), anchors_assemble_rrsets(), config_file::chrootdir, val_anchors::dlv_anchor, config_file::dlv_anchor_file, config_file::dlv_anchor_list, init_parents(), log_err(), config_strlist::next, config_strlist::str, config_file::trust_anchor_file_list, config_file::trust_anchor_list, and config_file::trusted_keys_file_list.
Referenced by val_apply_cfg().
struct trust_anchor* anchors_lookup | ( | struct val_anchors * | anchors, | |
uint8_t * | qname, | |||
size_t | qname_len, | |||
uint16_t | qclass | |||
) | [read] |
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. |
References trust_anchor::dclass, dname_count_labels(), dname_lab_cmp(), rbnode_t::key, trust_anchor::name, trust_anchor::namelabs, trust_anchor::namelen, trust_anchor::node, trust_anchor::parent, rbtree_find_less_equal(), and val_anchors::tree.
Referenced by processInit(), test_anchor_empty(), test_anchor_one(), test_anchors(), and val_mark_indeterminate().
struct trust_anchor* anchor_find | ( | struct val_anchors * | anchors, | |
uint8_t * | name, | |||
int | namelabs, | |||
size_t | namelen, | |||
uint16_t | dclass | |||
) | [read] |
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 |
References trust_anchor::dclass, rbnode_t::key, trust_anchor::name, trust_anchor::namelabs, trust_anchor::namelen, trust_anchor::node, rbtree_search(), and val_anchors::tree.
Referenced by anchor_store_new_key(), and iter_indicates_dnssec().
struct trust_anchor* anchor_store_str | ( | struct val_anchors * | anchors, | |
ldns_buffer * | buffer, | |||
const char * | str | |||
) | [read] |
Store one string as trust anchor RR.
anchors,: | anchor storage. | |
buffer,: | parsing buffer, to generate the RR wireformat in. | |
str,: | string. |
References anchor_store_new_rr(), and log_err().
Referenced by anchors_apply_cfg(), process_bind_contents(), test_anchor_one(), and test_anchors().
size_t anchors_get_mem | ( | struct val_anchors * | anchors | ) |
Get memory in use by the trust anchor storage.
anchors,: | anchor storage. |
References val_anchors::region, and regional_get_mem().
Referenced by val_get_mem().