Functions

/build/buildd-opendnssec_1.3.2-1~bpo60+1-kfreebsd-amd64-h4OQha/opendnssec-1.3.2/signer/src/signer/rrset.c File Reference

#include "config.h"
#include "daemon/worker.h"
#include "scheduler/fifoq.h"
#include "shared/allocator.h"
#include "shared/duration.h"
#include "shared/file.h"
#include "shared/hsm.h"
#include "shared/log.h"
#include "shared/status.h"
#include "shared/util.h"
#include "signer/rrset.h"
#include <ldns/ldns.h>
#include <stdlib.h>
Include dependency graph for rrset.c:

Go to the source code of this file.

Functions

void log_rr (ldns_rr *rr, const char *pre, int level)
rrset_type * rrset_create (ldns_rr_type rrtype)
ods_status rrset_recover (rrset_type *rrset, ldns_rr *rrsig, const char *locator, uint32_t flags)
int rrset_examine_ns_rdata (rrset_type *rrset, ldns_rdf *nsdname)
size_t rrset_count_RR (rrset_type *rrset)
size_t rrset_count_rr (rrset_type *rrset, int which)
ldns_rr * rrset_add_rr (rrset_type *rrset, ldns_rr *rr)
ldns_rr * rrset_del_rr (rrset_type *rrset, ldns_rr *rr, int dupallowed)
ods_status rrset_wipe_out (rrset_type *rrset)
ods_status rrset_diff (rrset_type *rrset, keylist_type *kl)
ods_status rrset_commit (rrset_type *rrset)
void rrset_rollback (rrset_type *rrset)
ods_status rrset_sign (hsm_ctx_t *ctx, rrset_type *rrset, ldns_rdf *owner, signconf_type *sc, time_t signtime, stats_type *stats)
ods_status rrset_queue (rrset_type *rrset, fifoq_type *q, worker_type *worker)
void rrset_cleanup (rrset_type *rrset)
void rrset_print (FILE *fd, rrset_type *rrset, int skip_rrsigs)
void rrset_backup (FILE *fd, rrset_type *rrset)

Function Documentation

void log_rr ( ldns_rr *  rr,
const char *  pre,
int  level 
)
ldns_rr* rrset_add_rr ( rrset_type *  rrset,
ldns_rr *  rr 
)
void rrset_backup ( FILE *  fd,
rrset_type *  rrset 
)

Backup RRset.

Definition at line 1217 of file rrset.c.

References rrset_struct::rrsigs, and rrsigs_print().

Referenced by domain_backup().

void rrset_cleanup ( rrset_type *  rrset  ) 
ods_status rrset_commit ( rrset_type *  rrset  ) 
size_t rrset_count_RR ( rrset_type *  rrset  ) 
size_t rrset_count_rr ( rrset_type *  rrset,
int  which 
)

Count the number of RRs in this RRset.

Definition at line 239 of file rrset.c.

References rrset_struct::add_count, COUNT_ADD, COUNT_DEL, COUNT_RR, rrset_struct::del_count, and rrset_struct::rr_count.

Referenced by domain_commit(), and domain_count_rrset().

rrset_type* rrset_create ( ldns_rr_type  rrtype  ) 
ldns_rr* rrset_del_rr ( rrset_type *  rrset,
ldns_rr *  rr,
int  dupallowed 
)
ods_status rrset_diff ( rrset_type *  rrset,
keylist_type *  kl 
)

Calculate differences between the current RRset and the pending new one.

Definition at line 425 of file rrset.c.

References rrset_struct::add, rrset_struct::add_count, keylist_lookup_by_dnskey(), ods_log_assert, ods_log_error(), rrset_struct::rr_type, rrset_struct::rrs, rrset_del_rr(), and util_dnssec_rrs_compare().

Referenced by domain_diff().

int rrset_examine_ns_rdata ( rrset_type *  rrset,
ldns_rdf *  nsdname 
)

Examine NS RRset and verify its RDATA.

Definition at line 207 of file rrset.c.

References rrset_struct::add, rrset_struct::del, rrset_struct::rr_type, and rrset_struct::rrs.

Referenced by domain_examine_ns_rdata().

void rrset_print ( FILE *  fd,
rrset_type *  rrset,
int  skip_rrsigs 
)

Print RRset.

Definition at line 1186 of file rrset.c.

References ods_log_assert, rrset_struct::rr_type, rrset_struct::rrs, rrset_struct::rrsigs, and rrsigs_print().

Referenced by domain_backup(), and domain_print().

ods_status rrset_queue ( rrset_type *  rrset,
fifoq_type *  q,
worker_type *  worker 
)
ods_status rrset_recover ( rrset_type *  rrset,
ldns_rr *  rrsig,
const char *  locator,
uint32_t  flags 
)

Recover RRSIG from backup.

This RRset was recovered, no need for signing. If the signature is about to expire, the recycle logic will catch that.

Definition at line 148 of file rrset.c.

References log_rr(), rrset_struct::needs_signing, ods_log_assert, ods_log_error(), ODS_STATUS_OK, rrset_struct::rrsig_count, rrset_struct::rrsigs, rrsigs_add_sig(), and rrsigs_create().

Referenced by domain_recover().

void rrset_rollback ( rrset_type *  rrset  ) 

Rollback updates from RRset.

Definition at line 701 of file rrset.c.

References rrset_struct::add, rrset_struct::add_count, rrset_struct::del, and rrset_struct::del_count.

Referenced by domain_rollback(), and zone_prepare_nsec3().

ods_status rrset_sign ( hsm_ctx_t *  ctx,
rrset_type *  rrset,
ldns_rdf *  owner,
signconf_type *  sc,
time_t  signtime,
stats_type *  stats 
)
ods_status rrset_wipe_out ( rrset_type *  rrset  ) 

Wipe out current RRs in RRset.

Definition at line 388 of file rrset.c.

References ods_log_error(), rrset_struct::rr_type, rrset_struct::rrs, and rrset_del_rr().

Referenced by denial_nsecify(), denial_nsecify3(), and zone_prepare_nsec3().