OpenDNSSEC-signer
2.1.3
|
#include "config.h"
#include <ldns/ldns.h>
#include "adapter/adapter.h"
#include "scheduler/schedule.h"
#include "locks.h"
#include "status.h"
#include "signer/ixfr.h"
#include "signer/namedb.h"
#include "signer/signconf.h"
#include "signer/stats.h"
#include "signer/rrset.h"
#include "wire/buffer.h"
#include "wire/notify.h"
#include "wire/xfrd.h"
#include "datastructure.h"
#include "daemon/engine.h"
Go to the source code of this file.
Data Structures | |
struct | zone_struct |
Typedefs | |
typedef enum zone_zl_status_enum | zone_zl_status |
typedef struct zone_struct | zone_type |
Enumerations | |
enum | zone_zl_status_enum { ZONE_ZL_OK = 0, ZONE_ZL_ADDED, ZONE_ZL_UPDATED, ZONE_ZL_REMOVED } |
Functions | |
zone_type * | zone_create (char *name, ldns_rr_class klass) |
ods_status | zone_load_signconf (zone_type *zone, signconf_type **new_signconf) |
ods_status | zone_reschedule_task (zone_type *zone, schedule_type *taskq, task_id what) |
ods_status | zone_publish_dnskeys (zone_type *zone, int skip_hsm_access) |
void | zone_rollback_dnskeys (zone_type *zone) |
ods_status | zone_publish_nsec3param (zone_type *zone) |
void | zone_rollback_nsec3param (zone_type *zone) |
ods_status | zone_prepare_keys (zone_type *zone) |
ods_status | zone_update_serial (zone_type *zone) |
rrset_type * | zone_lookup_rrset (zone_type *zone, ldns_rdf *owner, ldns_rr_type type) |
ods_status | zone_add_rr (zone_type *zone, ldns_rr *rr, int do_stats) |
ods_status | zone_del_rr (zone_type *zone, ldns_rr *rr, int do_stats) |
ods_status | zone_del_nsec3params (zone_type *zone) |
void | zone_merge (zone_type *z1, zone_type *z2) |
void | zone_cleanup (zone_type *zone) |
ods_status | zone_backup2 (zone_type *zone, time_t nextResign) |
ods_status | zone_recover2 (engine_type *engine, zone_type *zone) |
typedef struct zone_struct zone_type |
typedef enum zone_zl_status_enum zone_zl_status |
enum zone_zl_status_enum |
ods_status zone_add_rr | ( | zone_type * | zone, |
ldns_rr * | rr, | ||
int | do_stats | ||
) |
Add RR.
[in] | zone | zone |
[in] | rr | rr |
[in] | do_stats | true if we need to maintain statistics |
Add RR.
Definition at line 531 of file zone.c.
References zone_struct::db, zone_struct::name, namedb_add_domain(), namedb_lookup_domain(), and zone_struct::signconf.
ods_status zone_backup2 | ( | zone_type * | zone, |
time_t | nextResign | ||
) |
Backup zone.
[in] | zone | corresponding zone |
Backup zone.
Backup zone
Backup signconf
Backup NSEC3 parameters
Backup keylist
Backup domains and stuff
Done
Definition at line 1042 of file zone.c.
References zone_struct::db, namedb_struct::inbserial, namedb_struct::intserial, keylist_backup(), signconf_struct::keys, zone_struct::klass, zone_struct::name, namedb_backup2(), signconf_struct::nsec3_algo, signconf_struct::nsec3_iterations, signconf_struct::nsec3_optout, signconf_struct::nsec3_salt, signconf_struct::nsec3params, nsec3params_backup(), namedb_struct::outserial, nsec3params_struct::rr, zone_struct::signconf, and signconf_backup().
void zone_cleanup | ( | zone_type * | zone | ) |
Clean up zone.
[in] | zone | zone |
Clean up zone.
Definition at line 761 of file zone.c.
References adapter_cleanup(), zone_struct::adinbound, zone_struct::adoutbound, zone_struct::apex, zone_struct::db, zone_struct::ixfr, ixfr_cleanup(), zone_struct::name, namedb_cleanup(), zone_struct::notify, zone_struct::notify_args, notify_cleanup(), zone_struct::notify_command, zone_struct::policy_name, zone_struct::rrstore, zone_struct::signconf, signconf_cleanup(), zone_struct::signconf_filename, zone_struct::stats, stats_cleanup(), zone_struct::xfr_lock, zone_struct::xfrd, xfrd_cleanup(), and zone_struct::zone_lock.
Referenced by zonelist_add_zone().
zone_type* zone_create | ( | char * | name, |
ldns_rr_class | klass | ||
) |
Create a new zone.
[in] | name | zone name |
[in] | klass | zone class |
Create a new zone.
Definition at line 55 of file zone.c.
References zone_struct::name, zone_struct::xfr_lock, and zone_struct::zone_lock.
Referenced by zonelist_lookup_zone_by_name().
ods_status zone_del_nsec3params | ( | zone_type * | zone | ) |
Remove all NSEC3PARAM RRs from the zone
Delete NSEC3PARAM RRs.
Marks all NSEC3PARAM records as removed.
Definition at line 657 of file zone.c.
References zone_struct::apex, zone_struct::db, zone_struct::name, and namedb_lookup_domain().
ods_status zone_del_rr | ( | zone_type * | zone, |
ldns_rr * | rr, | ||
int | do_stats | ||
) |
Delete RR.
[in] | zone | zone |
[in] | rr | rr |
[in] | do_stats | true if we need to maintain statistics |
Delete RR.
Definition at line 613 of file zone.c.
References zone_struct::db, zone_struct::name, namedb_lookup_domain(), and zone_struct::signconf.
ods_status zone_load_signconf | ( | zone_type * | zone, |
signconf_type ** | new_signconf | ||
) |
Load signer configuration for zone.
[in] | zone | zone |
[out] | new_signconf | new signer configuration |
Load signer configuration for zone.
Definition at line 133 of file zone.c.
References zone_struct::name, zone_struct::signconf, and zone_struct::signconf_filename.
Referenced by tools_signconf().
rrset_type* zone_lookup_rrset | ( | zone_type * | zone, |
ldns_rdf * | owner, | ||
ldns_rr_type | type | ||
) |
Lookup RRset.
[in] | zone | zone |
[in] | owner | RRset owner |
[in] | type | RRtype |
Lookup RRset.
Definition at line 512 of file zone.c.
References zone_struct::db, domain_lookup_rrset(), and namedb_lookup_domain().
Referenced by zone_rollback_dnskeys(), and zone_rollback_nsec3param().
Merge zones. Values that are merged:
[in] | z1 | zone |
[in] | z2 | zone with new values |
Merge zones.
Definition at line 696 of file zone.c.
References zone_struct::policy_name.
ods_status zone_prepare_keys | ( | zone_type * | zone | ) |
Prepare keys for signing.
[in] | zone | zone |
Prepare keys for signing.
Definition at line 394 of file zone.c.
References zone_struct::db, signconf_struct::keys, zone_struct::name, and zone_struct::signconf.
ods_status zone_publish_dnskeys | ( | zone_type * | zone, |
int | skip_hsm_access | ||
) |
Publish the keys as indicated by the signer configuration.
[in] | zone | zone |
Publish the keys as indicated by the signer configuration.
Definition at line 186 of file zone.c.
References zone_struct::db, signconf_struct::keys, zone_struct::name, and zone_struct::signconf.
Referenced by tools_input().
ods_status zone_publish_nsec3param | ( | zone_type * | zone | ) |
Publish the NSEC3 parameters as indicated by the signer configuration.
[in] | zone | zone |
Publish the NSEC3 parameters as indicated by the signer configuration.
Always set bit 7 of the flags to zero, according to rfc5155 section 11
Definition at line 307 of file zone.c.
References zone_struct::db, zone_struct::name, signconf_struct::nsec3param_ttl, signconf_struct::nsec3params, signconf_struct::nsec_type, nsec3params_struct::rr, and zone_struct::signconf.
ods_status zone_recover2 | ( | engine_type * | engine, |
zone_type * | zone | ||
) |
ods_status zone_reschedule_task | ( | zone_type * | zone, |
schedule_type * | taskq, | ||
task_id | what | ||
) |
Reschedule task for zone.
[in] | zone | zone |
[in] | taskq | task queue |
[in] | what | new task identifier |
void zone_rollback_dnskeys | ( | zone_type * | zone | ) |
Unlink DNSKEY RRs.
[in] | zone | zone |
Unlink DNSKEY RRs.
Definition at line 279 of file zone.c.
References zone_struct::apex, keylist_struct::count, key_struct::dnskey, rr_struct::exists, signconf_struct::keys, keylist_struct::keys, rr_struct::rr, rrset_lookup_rr(), zone_struct::signconf, and zone_lookup_rrset().
void zone_rollback_nsec3param | ( | zone_type * | zone | ) |
Unlink NSEC3PARAM RR.
[in] | zone | zone |
Unlink NSEC3PARAM RR.
Definition at line 370 of file zone.c.
References zone_struct::apex, rr_struct::exists, signconf_struct::nsec3params, rr_struct::rr, nsec3params_struct::rr, rrset_lookup_rr(), zone_struct::signconf, and zone_lookup_rrset().
ods_status zone_update_serial | ( | zone_type * | zone | ) |
Update serial.
[in] | zone | zone |
Update serial.
Definition at line 436 of file zone.c.
References zone_struct::apex, zone_struct::db, zone_struct::name, namedb_struct::serial_updated, and zone_struct::signconf.