OpenDNSSEC-signer
1.3.8
|
#include "scheduler/task.h"
#include "shared/allocator.h"
#include "shared/duration.h"
#include "signer/keys.h"
#include <ldns/ldns.h>
#include <time.h>
Go to the source code of this file.
Data Structures | |
struct | signconf_struct |
Typedefs | |
typedef struct signconf_struct | signconf_type |
Functions | |
signconf_type * | signconf_create (void) |
ods_status | signconf_update (signconf_type **signconf, const char *scfile, time_t last_modified) |
signconf_type * | signconf_recover_from_backup (const char *filename) |
void | signconf_backup (FILE *fd, signconf_type *sc) |
ods_status | signconf_check (signconf_type *signconf) |
task_id | signconf_compare_denial (signconf_type *a, signconf_type *b) |
task_id | signconf_compare_keys (signconf_type *a, signconf_type *b, ldns_rr_list *del) |
task_id | signconf_compare (signconf_type *a, signconf_type *b) |
void | signconf_cleanup (signconf_type *sc) |
void | signconf_print (FILE *out, signconf_type *sc, const char *name) |
void | signconf_log (signconf_type *sc, const char *name) |
typedef struct signconf_struct signconf_type |
Signer configuration. Signer Configuration.
Definition at line 50 of file signconf.h.
void signconf_backup | ( | FILE * | fd, |
signconf_type * | sc | ||
) |
Backup signer configuration.
[in] | fd | file descriptor |
[in] | sc | signer configuration settings |
Backup signconf values.
Definition at line 298 of file signconf.c.
References signconf_struct::audit, signconf_struct::dnskey_ttl, signconf_struct::last_modified, signconf_struct::nsec_type, ods_log_assert, signconf_struct::sig_inception_offset, signconf_struct::sig_jitter, signconf_struct::sig_refresh_interval, signconf_struct::sig_resign_interval, signconf_struct::sig_validity_default, signconf_struct::sig_validity_denial, signconf_struct::soa_min, signconf_struct::soa_serial, and signconf_struct::soa_ttl.
Referenced by zone_backup().
ods_status signconf_check | ( | signconf_type * | sc | ) |
Check signer configuration.
signconf | signer configuration |
Check signer configuration settings.
Definition at line 353 of file signconf.c.
References keylist_struct::count, signconf_struct::dnskey_ttl, signconf_struct::keys, signconf_struct::nsec3_algo, signconf_struct::nsec_type, ods_log_error(), ODS_STATUS_CFG_ERR, ODS_STATUS_OK, signconf_struct::sig_inception_offset, signconf_struct::sig_jitter, signconf_struct::sig_refresh_interval, signconf_struct::sig_resign_interval, signconf_struct::sig_validity_default, signconf_struct::sig_validity_denial, signconf_struct::soa_min, signconf_struct::soa_serial, and signconf_struct::soa_ttl.
Referenced by signconf_update().
void signconf_cleanup | ( | signconf_type * | sc | ) |
Clean up signer configuration.
[in] | sc | signconf to cleanup |
Clean up signer configuration.
Definition at line 590 of file signconf.c.
References signconf_struct::allocator, allocator_cleanup(), allocator_deallocate(), signconf_struct::dnskey_ttl, duration_cleanup(), signconf_struct::filename, keylist_cleanup(), signconf_struct::keys, signconf_struct::nsec3_salt, signconf_struct::sig_inception_offset, signconf_struct::sig_jitter, signconf_struct::sig_refresh_interval, signconf_struct::sig_resign_interval, signconf_struct::sig_validity_default, signconf_struct::sig_validity_denial, signconf_struct::soa_min, signconf_struct::soa_serial, and signconf_struct::soa_ttl.
Referenced by signconf_recover_from_backup(), signconf_update(), zone_cleanup(), zone_load_signconf(), and zone_recover().
task_id signconf_compare | ( | signconf_type * | a, |
signconf_type * | b | ||
) |
Compare signer configurations.
[in] | a | a signer configuration |
[in] | b | another signer configuration |
Compare signer configurations.
Definition at line 569 of file signconf.c.
References signconf_compare_denial(), signconf_compare_keys(), and TASK_NONE.
task_id signconf_compare_denial | ( | signconf_type * | a, |
signconf_type * | b | ||
) |
Compare signer configurations on denial of existence material.
[in] | a | a signer configuration |
[in] | b | another signer configuration |
Compare signer configurations on denial of existence material.
Definition at line 434 of file signconf.c.
References duration_compare(), signconf_struct::nsec3_algo, signconf_struct::nsec3_iterations, signconf_struct::nsec3_optout, signconf_struct::nsec3_salt, signconf_struct::nsec_type, ods_log_assert, ods_strcmp(), signconf_struct::soa_min, TASK_NONE, and TASK_NSECIFY.
Referenced by signconf_compare(), and zone_load_signconf().
task_id signconf_compare_keys | ( | signconf_type * | a, |
signconf_type * | b, | ||
ldns_rr_list * | del | ||
) |
Compare signer configurations on key material.
[in] | a | a signer configuration |
[in] | b | another signer configuration |
[out] | del | list of DNSKEY RRs that have to be removed |
Compare signer configurations on key material.
Keys in ka and kb with the same locator, have been compared when checking for deleted keys.
Definition at line 465 of file signconf.c.
References key_struct::algorithm, key_struct::dnskey, signconf_struct::dnskey_ttl, duration_compare(), keylist_struct::first_key, key_struct::flags, key_struct::hsmkey, keylist_lookup(), signconf_struct::keys, key_struct::ksk, lhsm_get_key(), key_struct::locator, key_struct::next, ods_log_assert, ods_log_error(), ODS_STATUS_OK, key_struct::publish, TASK_NONE, TASK_READ, TASK_SIGNCONF, and key_struct::zsk.
Referenced by signconf_compare(), and zone_load_signconf().
signconf_type* signconf_create | ( | void | ) |
Create a new signer configuration with the 'empty' settings.
Create a new signer configuration with the 'empty' settings.
Definition at line 54 of file signconf.c.
References signconf_struct::allocator, allocator_alloc(), allocator_cleanup(), allocator_create(), signconf_struct::audit, signconf_struct::dnskey_ttl, signconf_struct::filename, signconf_struct::keys, signconf_struct::last_modified, signconf_struct::nsec3_algo, signconf_struct::nsec3_iterations, signconf_struct::nsec3_optout, signconf_struct::nsec3_salt, signconf_struct::nsec_type, ods_log_assert, ods_log_error(), signconf_struct::sig_inception_offset, signconf_struct::sig_jitter, signconf_struct::sig_refresh_interval, signconf_struct::sig_resign_interval, signconf_struct::sig_validity_default, signconf_struct::sig_validity_denial, signconf_struct::soa_min, signconf_struct::soa_serial, and signconf_struct::soa_ttl.
Referenced by signconf_recover_from_backup(), signconf_update(), zone_create(), and zone_recover().
void signconf_log | ( | signconf_type * | sc, |
const char * | name | ||
) |
Log signer configuration.
[in] | sc | signconf to log |
[in] | name | zone name |
Log sign configuration.
Definition at line 731 of file signconf.c.
References signconf_struct::audit, signconf_struct::dnskey_ttl, duration2string(), keylist_log(), signconf_struct::keys, signconf_struct::nsec3_algo, signconf_struct::nsec3_iterations, signconf_struct::nsec3_optout, signconf_struct::nsec3_salt, signconf_struct::nsec_type, ods_log_info(), signconf_struct::sig_inception_offset, signconf_struct::sig_jitter, signconf_struct::sig_refresh_interval, signconf_struct::sig_resign_interval, signconf_struct::sig_validity_default, signconf_struct::sig_validity_denial, signconf_struct::soa_min, signconf_struct::soa_serial, and signconf_struct::soa_ttl.
Referenced by zone_load_signconf().
void signconf_print | ( | FILE * | out, |
signconf_type * | sc, | ||
const char * | name | ||
) |
Print signer configuration.
[in] | out | file descriptor |
[in] | sc | signconf to print |
[in] | name | zone name |
Print sign configuration.
Definition at line 622 of file signconf.c.
References signconf_struct::audit, signconf_struct::dnskey_ttl, duration2string(), keylist_print(), signconf_struct::keys, signconf_struct::nsec3_algo, signconf_struct::nsec3_iterations, signconf_struct::nsec3_optout, signconf_struct::nsec3_salt, signconf_struct::nsec_type, signconf_struct::sig_inception_offset, signconf_struct::sig_jitter, signconf_struct::sig_refresh_interval, signconf_struct::sig_resign_interval, signconf_struct::sig_validity_default, signconf_struct::sig_validity_denial, signconf_struct::soa_min, signconf_struct::soa_serial, and signconf_struct::soa_ttl.
signconf_type* signconf_recover_from_backup | ( | const char * | filename | ) |
Read signer configuration from backup.
[in] | filename | file name |
Read a signer configuration from backup.
Definition at line 216 of file signconf.c.
References signconf_struct::audit, backup_read_check_str(), backup_read_duration(), backup_read_int(), backup_read_rr_type(), backup_read_str(), backup_read_time_t(), signconf_struct::dnskey_ttl, signconf_struct::filename, signconf_struct::last_modified, signconf_struct::nsec_type, ods_fclose(), ods_fopen(), ods_log_debug(), ods_log_error(), signconf_struct::sig_inception_offset, signconf_struct::sig_jitter, signconf_struct::sig_refresh_interval, signconf_struct::sig_resign_interval, signconf_struct::sig_validity_default, signconf_struct::sig_validity_denial, signconf_cleanup(), signconf_create(), signconf_struct::soa_min, signconf_struct::soa_serial, and signconf_struct::soa_ttl.
ods_status signconf_update | ( | signconf_type ** | signconf, |
const char * | scfile, | ||
time_t | last_modified | ||
) |
Update signer configuration.
[out] | signconf | signer configuration |
[in] | scfile | signer configuration file name |
[in] | last_modified | last known modification |
Update signer configuration.
Definition at line 160 of file signconf.c.
References signconf_struct::last_modified, ods_file_lastmodified(), ods_log_assert, ods_log_deeebug(), ods_log_error(), ods_status2str(), ODS_STATUS_CFG_ERR, ODS_STATUS_ERR, ODS_STATUS_OK, ODS_STATUS_UNCHANGED, signconf_check(), signconf_cleanup(), and signconf_create().
Referenced by zone_load_signconf().