OpenDNSSEC-signer 1.2.1
|
#include "config.h"
#include "adapter/adapter.h"
#include "scheduler/locks.h"
#include "signer/nsec3params.h"
#include "signer/signconf.h"
#include "signer/stats.h"
#include "signer/zonedata.h"
#include <ldns/ldns.h>
Go to the source code of this file.
Data Structures | |
struct | zone_struct |
Typedefs | |
typedef struct zone_struct | zone_type |
Functions | |
zone_type * | zone_create (const char *name, ldns_rr_class klass) |
void | zone_update_zonelist (zone_type *z1, zone_type *z2) |
int | zone_update_signconf (zone_type *zone, struct tasklist_struct *tl, char *buf) |
int | zone_update_zonedata (zone_type *zone) |
int | zone_add_dnskeys (zone_type *zone) |
int | zone_add_rr (zone_type *zone, ldns_rr *rr, int recover) |
int | zone_del_rr (zone_type *zone, ldns_rr *rr) |
int | zone_nsecify (zone_type *zone) |
int | zone_sign (zone_type *zone) |
int | zone_backup_state (zone_type *zone) |
void | zone_recover_from_backup (zone_type *zone, struct tasklist_struct *tl) |
void | zone_cleanup (zone_type *zone) |
void | zone_print (FILE *fd, zone_type *zone) |
typedef struct zone_struct zone_type |
int zone_add_dnskeys | ( | zone_type * | zone | ) |
Add DNSKEY and NSEC3PARAM records to the zone.
[in] | zone | corresponding zone |
Publish DNSKEY and NSEC3PARAM records to the zone.
Definition at line 455 of file zone.c.
References zone_struct::name, signconf_struct::nsec_type, se_build_path(), se_fclose(), se_fopen(), se_free(), se_log_assert, se_log_error(), se_log_warning(), zone_struct::signconf, and zone_struct::zonedata.
Referenced by tools_add_dnskeys().
int zone_add_rr | ( | zone_type * | zone, |
ldns_rr * | rr, | ||
int | recover | ||
) |
Add a RR to the zone.
[in] | zone | zone structure |
[in] | rr | RR |
[in] | recover | true if we are recovering from backup |
Add a RR to the zone.
Definition at line 504 of file zone.c.
References zone_struct::dname, signconf_struct::dnskey_ttl, duration2time(), zone_struct::name, se_log_assert, se_log_error(), se_log_verbose(), se_log_warning(), SE_SOA_RDATA_MINIMUM, zone_struct::signconf, signconf_struct::soa_min, signconf_struct::soa_ttl, zone_struct::zonedata, zonedata_add_rr(), and zonedata_recover_rr_from_backup().
int zone_backup_state | ( | zone_type * | zone | ) |
Backup zone state.
[in] | zone | corresponding zone |
Backup zone data.
[in] | zone | corresponding zone |
Definition at line 697 of file zone.c.
References zonedata_struct::default_ttl, zone_struct::fetch, zonedata_struct::inbound_serial, zonedata_struct::internal_serial, zone_struct::klass, zone_struct::name, zonedata_struct::outbound_serial, se_build_path(), se_fclose(), se_fopen(), se_free(), se_log_assert, se_log_error(), zone_struct::signconf, and zone_struct::zonedata.
Referenced by tools_add_dnskeys(), tools_read_input(), tools_sign(), tools_update(), and tools_write_output().
void zone_cleanup | ( | zone_type * | zone | ) |
Clean up a zone.
[in] | zone | zone to cleanup |
Clean up a zone.
Definition at line 1049 of file zone.c.
References adapter_cleanup(), zone_struct::dname, zone_struct::inbound_adapter, lock_basic_destroy, zone_struct::name, zone_struct::notify_ns, zone_struct::nsec3params, nsec3params_cleanup(), zone_struct::outbound_adapter, zone_struct::policy_name, se_free(), se_log_warning(), zone_struct::signconf, signconf_cleanup(), zone_struct::signconf_filename, zone_struct::stats, stats_cleanup(), zone_struct::zone_lock, zone_struct::zonedata, and zonedata_cleanup().
Referenced by zone_update_zonelist(), zonelist_add_zone(), and zonelist_cleanup().
zone_type* zone_create | ( | const char * | name, |
ldns_rr_class | klass | ||
) |
Create a new zone.
[in] | name | zone name |
[in] | klass | zone class |
Zone. Create a new zone.
Definition at line 59 of file zone.c.
References zone_struct::backoff, zone_struct::dname, zone_struct::fetch, zone_struct::in_progress, zone_struct::inbound_adapter, zone_struct::just_added, zone_struct::just_updated, zone_struct::klass, lock_basic_init, zone_struct::name, zone_struct::notify_ns, zone_struct::nsec3params, zone_struct::outbound_adapter, zone_struct::policy_name, zone_struct::processed, se_calloc(), se_log_assert, se_log_debug(), se_strdup(), zone_struct::signconf, zone_struct::signconf_filename, zone_struct::stats, stats_create(), zone_struct::task, zone_struct::tobe_removed, zone_struct::zone_lock, zone_struct::zonedata, and zonedata_create().
Referenced by parse_zonelist_zones().
int zone_del_rr | ( | zone_type * | zone, |
ldns_rr * | rr | ||
) |
Delete a RR from the zone.
[in] | zone | zone structure |
[in] | rr | RR |
Delete a RR from the zone.
Definition at line 571 of file zone.c.
References se_log_assert, zone_struct::zonedata, and zonedata_del_rr().
int zone_nsecify | ( | zone_type * | zone | ) |
Nsecify zone.
[in] | zone | zone to nsecify |
Nsecify zone.
Definition at line 585 of file zone.c.
References zone_struct::dname, zone_struct::klass, zone_struct::name, signconf_struct::nsec3_optout, zone_struct::nsec3params, stats_struct::nsec_count, stats_struct::nsec_time, signconf_struct::nsec_type, se_build_path(), se_fclose(), se_fopen(), se_free(), se_log_assert, se_log_debug(), se_log_error(), se_log_warning(), zone_struct::signconf, zone_struct::stats, zone_struct::zonedata, zonedata_entize(), zonedata_nsecify(), zonedata_nsecify3(), and zonedata_print_nsec().
Referenced by tools_nsecify().
void zone_print | ( | FILE * | out, |
zone_type * | zone | ||
) |
Print a zone.
[in] | out | file descriptor |
[in] | zone | zone to print |
Print zone.
Definition at line 1111 of file zone.c.
References se_log_assert, zone_struct::zonedata, and zonedata_print().
Referenced by adfile_write().
void zone_recover_from_backup | ( | zone_type * | zone, |
struct tasklist_struct * | tl | ||
) |
Recover from backup.
[in] | zone | corresponding zone |
[in] | tl | task list |
Recover from backup.
Definition at line 877 of file zone.c.
References adfile_read(), backup_read_check_str(), backup_read_int(), backup_read_uint32_t(), zonedata_struct::default_ttl, zone_struct::fetch, zonedata_struct::inbound_serial, zonedata_struct::internal_serial, keylist_create(), signconf_struct::keys, zone_struct::klass, signconf_struct::last_modified, signconf_struct::name, zone_struct::name, zonedata_struct::outbound_serial, se_build_path(), se_fclose(), se_fopen(), se_free(), se_log_assert, se_log_deeebug(), se_log_error(), zone_struct::signconf, signconf_recover_from_backup(), zone_struct::task, task_create(), TASK_READ, task_recover_from_backup(), tasklist_schedule_task(), time_now(), task_struct::what, zone_struct::zonedata, zonedata_cleanup(), zonedata_create(), and zonedata_recover_from_backup().
int zone_sign | ( | zone_type * | zone | ) |
Sign zone.
[in] | zone | zone to sign |
Sign zone.
Definition at line 650 of file zone.c.
References zone_struct::dname, zone_struct::name, se_build_path(), se_fclose(), se_fopen(), se_free(), se_log_assert, se_log_warning(), stats_struct::sig_count, stats_struct::sig_reuse, stats_struct::sig_time, zone_struct::signconf, zone_struct::stats, zone_struct::zonedata, zonedata_print_rrsig(), and zonedata_sign().
Referenced by tools_sign().
int zone_update_signconf | ( | zone_type * | zone, |
struct tasklist_struct * | tl, | ||
char * | buf | ||
) |
Update signer configuration file.
[in] | zone | corresponding zone |
[in] | tl | task list |
[in] | buf | feedback buffer |
Read signer configuration.
Definition at line 156 of file zone.c.
References domain_struct::denial, zonedata_struct::denial_chain, zonedata_struct::domains, signconf_struct::last_modified, signconf_struct::name, zone_struct::name, zone_struct::nsec3params, nsec3params_cleanup(), zone_struct::policy_name, se_log_assert, se_log_debug(), se_log_error(), se_log_warning(), zone_struct::signconf, signconf_backup(), signconf_check(), signconf_cleanup(), signconf_compare(), zone_struct::signconf_filename, signconf_read(), zone_struct::task, task_create(), TASK_READ, tasklist_delete_task(), tasklist_schedule_task(), time_now(), task_struct::what, task_struct::when, zone_struct::zonedata, and zonedata_cleanup_denials().
Referenced by engine_update_zones().
int zone_update_zonedata | ( | zone_type * | zone | ) |
Update zone data.
[in] | zone | corresponding zone |
Update zone with pending changes.
Definition at line 427 of file zone.c.
References ADAPTER_FILE, zone_struct::dname, zone_struct::inbound_adapter, zone_struct::name, se_log_assert, se_log_debug(), se_log_error(), zone_struct::signconf, adapter_struct::type, zone_struct::zonedata, zonedata_cancel_update(), zonedata_examine(), and zonedata_update().
Referenced by tools_update().
Update zone configuration settings from zone list.
[in] | z1 | zone to be updated |
[in] | z2 | update |
Update zone configuration settings from zone list.
Definition at line 95 of file zone.c.
References adapter_cleanup(), adapter_compare(), adapter_create(), adapter_struct::filename, adapter_struct::inbound, zone_struct::inbound_adapter, zone_struct::just_updated, zone_struct::outbound_adapter, zone_struct::policy_name, se_free(), se_log_assert, se_strcmp(), se_strdup(), zone_struct::signconf_filename, adapter_struct::type, and zone_cleanup().
Referenced by zonelist_merge().