Electroneum
Loading...
Searching...
No Matches
val_anchor.h
Go to the documentation of this file.
1/*
2 * validator/val_anchor.h - validator trust anchor storage.
3 *
4 * Copyright (c) 2007, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * Neither the name of the NLNET LABS nor the names of its contributors may
20 * be used to endorse or promote products derived from this software without
21 * specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */
35
41
42#ifndef VALIDATOR_VAL_ANCHOR_H
43#define VALIDATOR_VAL_ANCHOR_H
44#include "util/rbtree.h"
45#include "util/locks.h"
46struct trust_anchor;
47struct config_file;
49struct autr_point_data;
50struct autr_global_data;
51struct sldns_buffer;
52
75
79struct ta_key {
81 struct ta_key* next;
85 size_t len;
88};
89
124
130
135void anchors_delete(struct val_anchors* anchors);
136
143int anchors_apply_cfg(struct val_anchors* anchors, struct config_file* cfg);
144
154
166 uint8_t* qname, size_t qname_len, uint16_t qclass);
167
177struct trust_anchor* anchor_find(struct val_anchors* anchors,
178 uint8_t* name, int namelabs, size_t namelen, uint16_t dclass);
179
188 struct sldns_buffer* buffer, const char* str);
189
195size_t anchors_get_mem(struct val_anchors* anchors);
196
198int anchor_cmp(const void* k1, const void* k2);
199
208
217 uint8_t* nm);
218
228size_t anchor_list_keytags(struct trust_anchor* ta, uint16_t* list, size_t num);
229
243 size_t namelen, uint16_t dclass, uint16_t keytag);
244
245#endif /* VALIDATOR_VAL_ANCHOR_H */
int lock_basic_type
Definition locks.h:269
unsigned short uint16_t
Definition stdint.h:125
unsigned char uint8_t
Definition stdint.h:124
struct ta_key * next
Definition val_anchor.h:81
size_t len
Definition val_anchor.h:85
uint16_t type
Definition val_anchor.h:87
uint8_t * data
Definition val_anchor.h:83
size_t numDNSKEY
Definition val_anchor.h:116
struct ub_packed_rrset_key * dnskey_rrset
Definition val_anchor.h:120
uint16_t dclass
Definition val_anchor.h:122
struct ta_key * keylist
Definition val_anchor.h:110
struct autr_point_data * autr
Definition val_anchor.h:112
rbnode_type node
Definition val_anchor.h:96
size_t namelen
Definition val_anchor.h:102
struct ub_packed_rrset_key * ds_rrset
Definition val_anchor.h:118
uint8_t * name
Definition val_anchor.h:100
lock_basic_type lock
Definition val_anchor.h:98
struct trust_anchor * parent
Definition val_anchor.h:106
struct trust_anchor * dlv_anchor
Definition val_anchor.h:71
lock_basic_type lock
Definition val_anchor.h:62
struct autr_global_data * autr
Definition val_anchor.h:73
rbtree_type * tree
Definition val_anchor.h:69
void anchors_delete_insecure(struct val_anchors *anchors, uint16_t c, uint8_t *nm)
struct val_anchors * anchors_create(void)
size_t anchors_get_mem(struct val_anchors *anchors)
void anchors_init_parents_locked(struct val_anchors *anchors)
struct trust_anchor * anchor_store_str(struct val_anchors *anchors, struct sldns_buffer *buffer, const char *str)
int anchor_cmp(const void *k1, const void *k2)
int anchor_has_keytag(struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass, uint16_t keytag)
struct trust_anchor * anchor_find(struct val_anchors *anchors, uint8_t *name, int namelabs, size_t namelen, uint16_t dclass)
void anchors_delete(struct val_anchors *anchors)
int anchors_apply_cfg(struct val_anchors *anchors, struct config_file *cfg)
int anchors_add_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)
struct trust_anchor * anchors_lookup(struct val_anchors *anchors, uint8_t *qname, size_t qname_len, uint16_t qclass)