OpenDNSSEC-signer
2.1.3
|
#include "config.h"
#include <ldns/ldns.h>
#include "status.h"
#include "signer/stats.h"
#include "libhsm.h"
#include "domain.h"
#include "zone.h"
#include "datastructure.h"
Go to the source code of this file.
Data Structures | |
struct | rrsig_struct |
struct | rr_struct |
struct | rrset_struct |
Typedefs | |
typedef struct rrsig_struct | rrsig_type |
typedef struct rr_struct | rr_type |
typedef struct rrset_struct | rrset_type |
Functions | |
void | log_rr (ldns_rr *rr, const char *pre, int level) |
void | log_rrset (ldns_rdf *dname, ldns_rr_type type, const char *pre, int level) |
const char * | rrset_type2str (ldns_rr_type type) |
rrset_type * | rrset_create (zone_type *zone, ldns_rr_type type) |
rr_type * | rrset_lookup_rr (rrset_type *rrset, ldns_rr *rr) |
uint32_t | rrset_lookup_ttl (rrset_type *rrset, uint32_t default_ttl) |
size_t | rrset_count_rr_is_added (rrset_type *rrset) |
rr_type * | rrset_add_rr (rrset_type *rrset, ldns_rr *rr) |
void | rrset_del_rr (rrset_type *rrset, uint16_t rrnum) |
void | rrset_add_rrsig (rrset_type *rrset, ldns_rr *rr, const char *locator, uint32_t flags) |
void | rrset_drop_rrsigs (zone_type *zone, rrset_type *rrset) |
void | rrset_diff (rrset_type *rrset, unsigned is_ixfr, unsigned more_coming) |
ods_status | rrset_sign (hsm_ctx_t *ctx, rrset_type *rrset, time_t signtime) |
ods_status | rrset_getliteralrr (ldns_rr **dnskey, const char *resourcerecord, uint32_t ttl, ldns_rdf *apex) |
void | rrset_print (FILE *fd, rrset_type *rrset, int skip_rrsigs, ods_status *status) |
void | rrset_cleanup (rrset_type *rrset) |
void | rrset_backup2 (FILE *fd, rrset_type *rrset) |
collection_class | rrset_store_initialize (void) |
typedef struct rrset_struct rrset_type |
typedef struct rrsig_struct rrsig_type |
void log_rr | ( | ldns_rr * | rr, |
const char * | pre, | ||
int | level | ||
) |
Log RR.
[in] | rr | RR |
[in] | pre | log message |
[in] | level | log level |
Log RR.
Definition at line 48 of file rrset.c.
Referenced by rrset_del_rr().
void log_rrset | ( | ldns_rdf * | dname, |
ldns_rr_type | type, | ||
const char * | pre, | ||
int | level | ||
) |
Log RRset.
[in] | dname | domain name |
[in] | type | RRtype |
[in] | pre | log message |
[in] | level | log level |
Log RRset.
Definition at line 99 of file rrset.c.
Referenced by domain_add_rrset(), domain_diff(), domain_rollback(), and namedb_examine().
rr_type* rrset_add_rr | ( | rrset_type * | rrset, |
ldns_rr * | rr | ||
) |
Add RR to RRset.
[in] | rrset | RRset |
[in] | rr | RR |
Add RR to RRset.
Definition at line 299 of file rrset.c.
References rrset_struct::rr_count, rrset_struct::rrs, and rrset_struct::rrtype.
void rrset_add_rrsig | ( | rrset_type * | rrset, |
ldns_rr * | rr, | ||
const char * | locator, | ||
uint32_t | flags | ||
) |
Add RRSIG to RRset.
[in] | rrset | RRset |
[in] | rr | RRSIG |
[in] | locator | key locator |
[in] | flags | key flags |
Add RRSIG to RRset.
Definition at line 435 of file rrset.c.
References rrset_struct::domain, rrsig_struct::key_flags, rrsig_struct::key_locator, rrsig_struct::owner, rrsig_struct::rr, and rrset_struct::rrsigs.
void rrset_backup2 | ( | FILE * | fd, |
rrset_type * | rrset | ||
) |
Backup RRset.
[in] | fd | file descriptor |
[in] | rrset | RRset |
Backup RRset.
Definition at line 948 of file rrset.c.
References rrsig_struct::key_flags, rrsig_struct::key_locator, rrsig_struct::rr, and rrset_struct::rrsigs.
Referenced by domain_backup2(), and namedb_backup2().
void rrset_cleanup | ( | rrset_type * | rrset | ) |
Clean up RRset.
[in] | rrset | RRset to be cleaned up |
Clean up RRset.
Definition at line 925 of file rrset.c.
References rrset_struct::domain, rrset_struct::next, rr_struct::owner, rr_struct::rr, rrset_struct::rr_count, rrset_struct::rrs, rrset_cleanup(), and rrset_struct::rrsigs.
Referenced by denial_cleanup(), domain_cleanup(), domain_diff(), domain_rollback(), namedb_wipe_denial(), and rrset_cleanup().
size_t rrset_count_rr_is_added | ( | rrset_type * | rrset | ) |
Count the number of RRs in this RRset that have is_added.
[in] | rrset | RRset |
Count the number of RRs in this RRset that have is_added.
Definition at line 278 of file rrset.c.
References rr_struct::is_added, rrset_struct::rr_count, and rrset_struct::rrs.
Referenced by domain_count_rrset_is_added(), and namedb_examine().
rrset_type* rrset_create | ( | zone_type * | zone, |
ldns_rr_type | type | ||
) |
Create RRset.
[in] | zoneptr | zone reference |
[in] | type | RRtype |
Create RRset.
Definition at line 199 of file rrset.c.
Referenced by denial_add_rr().
void rrset_del_rr | ( | rrset_type * | rrset, |
uint16_t | rrnum | ||
) |
Delete RR from RRset.
[in] | rrset | RRset |
[in] | rrnum | position of RR |
Delete RR from RRset.
Definition at line 334 of file rrset.c.
References log_rr(), rr_struct::owner, rr_struct::rr, rrset_struct::rr_count, and rrset_struct::rrs.
Referenced by domain_rollback(), namedb_wipe_denial(), and rrset_diff().
void rrset_diff | ( | rrset_type * | rrset, |
unsigned | is_ixfr, | ||
unsigned | more_coming | ||
) |
Apply differences at RRset.
[in] | rrset | RRset |
[in] | is_ixfr | true if incremental change |
[in] | more_coming | more transactions possible |
Apply differences at RRset.
Definition at line 366 of file rrset.c.
References zone_struct::db, rr_struct::exists, rr_struct::is_added, namedb_struct::is_initialized, rr_struct::is_removed, zone_struct::ixfr, ixfr_add_rr(), ixfr_del_rr(), ixfr_struct::ixfr_lock, rr_struct::rr, rrset_struct::rr_count, rrset_struct::rrs, rrset_del_rr(), rrset_drop_rrsigs(), rrset_struct::rrtype, and rrset_struct::zone.
Referenced by denial_diff(), and domain_diff().
void rrset_drop_rrsigs | ( | zone_type * | zone, |
rrset_type * | rrset | ||
) |
Delete all RRSIG from RRset and add then to the zone's outgoing IXFR as change.
[in] | rrset | RRset |
[in] | rrnum | position of RRSIG |
Remove signatures, deallocate storage and add then to the outgoing IFXR for that zone.
Definition at line 416 of file rrset.c.
References zone_struct::db, namedb_struct::is_initialized, zone_struct::ixfr, ixfr_del_rr(), ixfr_struct::ixfr_lock, rrsig_struct::rr, and rrset_struct::rrsigs.
Referenced by namedb_wipe_denial(), and rrset_diff().
ods_status rrset_getliteralrr | ( | ldns_rr ** | dnskey, |
const char * | resourcerecord, | ||
uint32_t | ttl, | ||
ldns_rdf * | apex | ||
) |
Obtain a resource record (containing a signature of a dnskeyset or a dnskeyset, but that is not a hard requirement), from a raw string
[out] | dnskey | the resulting resource record |
[in] | resourcerecord | the string representation of the resource record |
[in] | ttl | the time-to-live to use if non is specified |
[in] | apex | the owner domain is none can be determined from input string |
rr_type* rrset_lookup_rr | ( | rrset_type * | rrset, |
ldns_rr * | rr | ||
) |
Lookup RR in RRset.
[in] | rrset | RRset |
[in] | rr | RR |
Lookup RR in RRset.
Definition at line 236 of file rrset.c.
References rr_struct::rr, rrset_struct::rr_count, and rrset_struct::rrs.
Referenced by zone_rollback_dnskeys(), and zone_rollback_nsec3param().
uint32_t rrset_lookup_ttl | ( | rrset_type * | rrset, |
uint32_t | default_ttl | ||
) |
What TTL should new RR's in this RRS get?
Definition at line 263 of file rrset.c.
References rr_struct::is_added, rr_struct::rr, rrset_struct::rr_count, and rrset_struct::rrs.
void rrset_print | ( | FILE * | fd, |
rrset_type * | rrset, | ||
int | skip_rrsigs, | ||
ods_status * | status | ||
) |
Print RRset.
[in] | fd | file descriptor |
[in] | rrset | RRset to be printed |
[in] | skip_rrsigs | if true, don't print RRSIG records |
[out] | status | status |
Print RRset.
Definition at line 868 of file rrset.c.
Referenced by domain_backup2(), and namedb_backup2().
ods_status rrset_sign | ( | hsm_ctx_t * | ctx, |
rrset_type * | rrset, | ||
time_t | signtime | ||
) |
Sign RRset.
[in] | ctx | HSM context |
[in] | rrset | RRset |
[in] | signtime | time when the zone is being signed |
Sign RRset.
We know this key doesn't sign the set, but only if n_sig < n_active_keys we should sign. If we already counted active keys for this algorithm sjip counting step
Definition at line 667 of file rrset.c.
References rrset_struct::domain, domain_is_delegpt(), domain_is_occluded(), rrset_struct::rrtype, zone_struct::signconf, and rrset_struct::zone.