Electroneum
autotrust.h File Reference
Include dependency graph for autotrust.h:

Go to the source code of this file.

Classes

struct  autr_ta
 
struct  autr_point_data
 
struct  autr_global_data
 

Enumerations

enum  autr_state_type {
  AUTR_STATE_START = 0, AUTR_STATE_ADDPEND = 1, AUTR_STATE_VALID = 2, AUTR_STATE_MISSING = 3,
  AUTR_STATE_REVOKED = 4, AUTR_STATE_REMOVED = 5
}
 

Functions

struct autr_global_dataautr_global_create (void)
 
void autr_global_delete (struct autr_global_data *global)
 
size_t autr_get_num_anchors (struct val_anchors *anchors)
 
time_t autr_probe_timer (struct module_env *env)
 
int probetree_cmp (const void *x, const void *y)
 
int autr_read_file (struct val_anchors *anchors, const char *nm)
 
void autr_write_file (struct module_env *env, struct trust_anchor *tp)
 
void autr_point_delete (struct trust_anchor *tp)
 
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 autr_debug_print (struct val_anchors *anchors)
 
void probe_answer_cb (void *arg, int rcode, struct sldns_buffer *buf, enum sec_status sec, char *errinf)
 

Detailed Description

Contains autotrust definitions.

Definition in file autotrust.h.

Enumeration Type Documentation

◆ autr_state_type

Autotrust anchor states

Enumerator
AUTR_STATE_START 
AUTR_STATE_ADDPEND 
AUTR_STATE_VALID 
AUTR_STATE_MISSING 
AUTR_STATE_REVOKED 
AUTR_STATE_REMOVED 

Definition at line 55 of file autotrust.h.

Function Documentation

◆ autr_debug_print()

void autr_debug_print ( struct val_anchors anchors)

Debug printout of rfc5011 tracked anchors

Parameters
anchorsall the anchors.

◆ autr_get_num_anchors()

size_t autr_get_num_anchors ( struct val_anchors anchors)

See if autotrust anchors are configured and how many.

Parameters
anchorsthe trust anchors structure.
Returns
number of autotrust trust anchors

◆ autr_global_create()

struct autr_global_data* autr_global_create ( void  )

Create new global 5011 data structure.

Returns
new structure or NULL on malloc failure.

◆ autr_global_delete()

void autr_global_delete ( struct autr_global_data global)

Delete global 5011 data structure.

Parameters
globalglobal autotrust state to delete.

◆ autr_point_delete()

void autr_point_delete ( struct trust_anchor tp)

Delete autr anchor, deletes the autr data but does not do unlinking from trees, caller does that.

Parameters
tptrust point to delete.

◆ autr_probe_timer()

time_t autr_probe_timer ( struct module_env env)

Process probe timer. Add new probes if needed.

Parameters
envmodule environment with time, with anchors and with the mesh.
Returns
time of next probe (in seconds from now). If 0, then there is no next probe anymore (trust points deleted).

◆ autr_process_prime()

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 
)

Perform autotrust processing.

Parameters
envqstate environment with the anchors structure.
vevalidator environment for verification of rrsigs.
tptrust anchor to process.
dnskey_rrsetDNSKEY rrset probed (can be NULL if bad prime result). allocated in a region. Has not been validated yet.
qstateqstate with region.
Returns
false if trust anchor was revoked completely. Otherwise logs errors to log, does not change return value. On errors, likely the trust point has been unchanged.

◆ autr_read_file()

int autr_read_file ( struct val_anchors anchors,
const char *  nm 
)

Read autotrust file.

Parameters
anchorsthe anchors structure.
nmname of the file (copied).
Returns
false on failure.

◆ autr_write_file()

void autr_write_file ( struct module_env env,
struct trust_anchor tp 
)

Write autotrust file.

Parameters
envenvironment with scratch space.
tptrust point to write.

◆ probe_answer_cb()

void probe_answer_cb ( void *  arg,
int  rcode,
struct sldns_buffer buf,
enum sec_status  sec,
char *  errinf 
)

callback for query answer to 5011 probe

◆ probetree_cmp()

int probetree_cmp ( const void *  x,
const void *  y 
)

probe tree compare function