Electroneum
Loading...
Searching...
No Matches
autotrust.h
Go to the documentation of this file.
1/*
2 * validator/autotrust.h - RFC5011 trust anchor management for unbound.
3 *
4 * Copyright (c) 2009, 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_AUTOTRUST_H
43#define VALIDATOR_AUTOTRUST_H
44#include "util/rbtree.h"
46struct val_anchors;
47struct trust_anchor;
49struct module_env;
50struct module_qstate;
51struct val_env;
52struct sldns_buffer;
53
63
85
123
132
138
144
150size_t autr_get_num_anchors(struct val_anchors* anchors);
151
158time_t autr_probe_timer(struct module_env* env);
159
161int probetree_cmp(const void* x, const void* y);
162
169int autr_read_file(struct val_anchors* anchors, const char* nm);
170
176void autr_write_file(struct module_env* env, struct trust_anchor* tp);
177
184
197int autr_process_prime(struct module_env* env, struct val_env* ve,
198 struct trust_anchor* tp, struct ub_packed_rrset_key* dnskey_rrset,
199 struct module_qstate* qstate);
200
205void autr_debug_print(struct val_anchors* anchors);
206
208void probe_answer_cb(void* arg, int rcode, struct sldns_buffer* buf,
209 enum sec_status sec, char* errinf);
210
211#endif /* VALIDATOR_AUTOTRUST_H */
autr_state_type
Definition autotrust.h:55
@ AUTR_STATE_START
Definition autotrust.h:56
@ AUTR_STATE_ADDPEND
Definition autotrust.h:57
@ AUTR_STATE_REMOVED
Definition autotrust.h:61
@ AUTR_STATE_REVOKED
Definition autotrust.h:60
@ AUTR_STATE_MISSING
Definition autotrust.h:59
@ AUTR_STATE_VALID
Definition autotrust.h:58
void autr_write_file(struct module_env *env, struct trust_anchor *tp)
time_t autr_probe_timer(struct module_env *env)
struct autr_global_data * autr_global_create(void)
void autr_debug_print(struct val_anchors *anchors)
size_t autr_get_num_anchors(struct val_anchors *anchors)
int probetree_cmp(const void *x, const void *y)
void autr_point_delete(struct trust_anchor *tp)
int autr_read_file(struct val_anchors *anchors, const char *nm)
void autr_global_delete(struct autr_global_data *global)
int autr_process_prime(struct module_env *env, struct val_env *ve, struct trust_anchor *tp, struct ub_packed_rrset_key *dnskey_rrset, struct module_qstate *qstate)
void probe_answer_cb(void *arg, int rcode, struct sldns_buffer *buf, enum sec_status sec, char *errinf)
void errinf(struct module_qstate *qstate, const char *str)
sec_status
const char * buf
unsigned char uint8_t
Definition stdint.h:124
rbtree_type probe
Definition autotrust.h:130
rbnode_type pnode
Definition autotrust.h:94
struct autr_ta * keys
Definition autotrust.h:97
time_t retry_time
Definition autotrust.h:113
time_t query_interval
Definition autotrust.h:111
time_t next_probe_time
Definition autotrust.h:108
time_t last_queried
Definition autotrust.h:104
uint8_t revoked
Definition autotrust.h:121
uint8_t query_failed
Definition autotrust.h:119
time_t last_success
Definition autotrust.h:106
uint8_t fetched
Definition autotrust.h:81
autr_state_type s
Definition autotrust.h:77
size_t dname_len
Definition autotrust.h:73
uint8_t revoked
Definition autotrust.h:83
uint8_t * rr
Definition autotrust.h:71
size_t rr_len
Definition autotrust.h:73
time_t last_change
Definition autotrust.h:75
struct autr_ta * next
Definition autotrust.h:69
uint8_t pending_count
Definition autotrust.h:79