OpenDNSSEC-enforcer
1.3.16
|
Go to the source code of this file.
Functions | |
int | server_init (DAEMONCONFIG *config) |
void | server_main (DAEMONCONFIG *config) |
int | do_keygen (DAEMONCONFIG *config, KSM_POLICY *policy, hsm_ctx_t *ctx) |
int | do_communication (DAEMONCONFIG *config, KSM_POLICY *policy, bool all_policies) |
int | commGenSignConf (char *zone_name, int zone_id, char *current_filename, KSM_POLICY *policy, int *signer_flag, int run_interval, int man_key_gen, const char *DSSubmitCmd) |
int | commKeyConfig (void *context, KSM_KEYDATA *key_data) |
int | allocateKeysToZone (KSM_POLICY *policy, int key_type, int zone_id, uint16_t interval, const char *zone_name, int man_key_gen, int rollover_scheme) |
int | read_zonelist_filename (const char *filename, char **zone_list_filename) |
int | do_purge (int interval, int policy_id) |
int | NewDSSet (int zone_id, const char *zone_name, const char *DSSubmitCmd) |
void | check_hsm_connection (hsm_ctx_t **ctx, DAEMONCONFIG *config) |
int allocateKeysToZone | ( | KSM_POLICY * | policy, |
int | key_type, | ||
int | zone_id, | ||
uint16_t | interval, | ||
const char * | zone_name, | ||
int | man_key_gen, | ||
int | rollover_scheme | ||
) |
Definition at line 1247 of file enforcer.c.
void check_hsm_connection | ( | hsm_ctx_t ** | ctx, |
DAEMONCONFIG * | config | ||
) |
Definition at line 1934 of file enforcer.c.
References DAEMONCONFIG::configfile, log_msg(), and DAEMONCONFIG::pidfile.
Referenced by server_main().
int commGenSignConf | ( | char * | zone_name, |
int | zone_id, | ||
char * | current_filename, | ||
KSM_POLICY * | policy, | ||
int * | signer_flag, | ||
int | run_interval, | ||
int | man_key_gen, | ||
const char * | DSSubmitCmd | ||
) |
Definition at line 865 of file enforcer.c.
References KSM_DENIAL_POLICY::algorithm, KSM_POLICY::audit, KSM_SIGNATURE_POLICY::clockskew, commKeyConfig(), KSM_POLICY::denial, DtParseDateTimeString(), KSM_POLICY::id, KSM_DENIAL_POLICY::iteration, KSM_SIGNER_POLICY::jitter, KSM_POLICY::ksk, KSM_TYPE_KSK, KSM_TYPE_ZSK, KsmKeywordSerialValueToName(), KsmRequestGenerateCount(), KsmRequestKeys(), log_msg(), MemFree, NewDSSet(), KSM_DENIAL_POLICY::optout, KSM_SIGNER_POLICY::refresh, KSM_SIGNATURE_POLICY::resign, KSM_DENIAL_POLICY::salt, KSM_SIGNER_POLICY::serial, KSM_POLICY::signature, KSM_POLICY::signer, KSM_SIGNER_POLICY::soamin, KSM_SIGNER_POLICY::soattl, StrAppend(), StrFree, KSM_DENIAL_POLICY::ttl, KSM_KEY_POLICY::ttl, KSM_SIGNATURE_POLICY::valdefault, KSM_SIGNATURE_POLICY::valdenial, and KSM_DENIAL_POLICY::version.
Referenced by do_communication().
int commKeyConfig | ( | void * | context, |
KSM_KEYDATA * | key_data | ||
) |
Definition at line 1190 of file enforcer.c.
References KSM_KEYDATA::algorithm, KSM_KEYDATA::keytype, KSM_STATE_ACTIVE, KSM_STATE_DEAD, KSM_STATE_GENERATE, KSM_STATE_KEYPUBLISH, KSM_TYPE_KSK, KSM_TYPE_ZSK, KSM_KEYDATA::location, and KSM_KEYDATA::state.
Referenced by commGenSignConf().
int do_communication | ( | DAEMONCONFIG * | config, |
KSM_POLICY * | policy, | ||
bool | all_policies | ||
) |
Definition at line 586 of file enforcer.c.
References allocateKeysToZone(), commGenSignConf(), DAEMONCONFIG::configfile, DAEMONCONFIG::DSSubmitCmd, DtDateDiff(), DtParseDateTimeString(), DAEMONCONFIG::interval, kaspSetPolicyDefaults(), KSM_POLICY::ksk, KSM_TYPE_KSK, KSM_TYPE_ZSK, KsmCheckNextRollover(), KsmPolicyRead(), KsmZoneIdFromName(), log_msg(), DAEMONCONFIG::manualKeyGeneration, KSM_POLICY::name, DAEMONCONFIG::pidfile, read_zonelist_filename(), KSM_KEY_POLICY::rollover_scheme, DAEMONCONFIG::rolloverNotify, StrAppend(), and StrFree.
Referenced by server_main().
int do_keygen | ( | DAEMONCONFIG * | config, |
KSM_POLICY * | policy, | ||
hsm_ctx_t * | ctx | ||
) |
Definition at line 345 of file enforcer.c.
References KSM_KEY_POLICY::algorithm, KSM_KEY_POLICY::bits, DbFreeResult(), DtParseDateTimeString(), KSM_POLICY::id, DAEMONCONFIG::interval, KSM_POLICY::ksk, KSM_TYPE_KSK, KSM_TYPE_ZSK, KsmKeyCountStillGood(), KsmKeyPairCreate(), KsmKeyPredict(), KsmZoneCount(), KsmZoneCountInit(), log_msg(), KSM_POLICY::name, DAEMONCONFIG::pidfile, KSM_KEY_POLICY::require_backup, KSM_KEY_POLICY::rollover_scheme, KSM_POLICY::shared_keys, KSM_KEY_POLICY::sm, KSM_KEY_POLICY::sm_capacity, KSM_KEY_POLICY::sm_name, StrFree, and KSM_POLICY::zsk.
Referenced by server_main().
int do_purge | ( | int | interval, |
int | policy_id | ||
) |
Definition at line 1466 of file enforcer.c.
References DbErrmsg(), DbExecuteSql(), DbExecuteSqlNoResult(), DbFetchRow(), DbFreeResult(), DbFreeRow(), DbHandle(), DbInt(), DbIntQuery(), DbString(), DbStringFree(), DdsConditionInt(), DdsEnd(), DdsFree(), DdsInit(), DQS_COMPARE_EQ, DQS_COMPARE_NE, DqsCountInit(), DqsEnd(), DqsFree(), DtParseDateTimeString(), DusEnd(), DusFree(), KSM_INT_STR_SIZE, KSM_SQL_SIZE, KSM_STATE_DEAD, log_msg(), StrAppend(), and StrFree.
Referenced by server_main().
int NewDSSet | ( | int | zone_id, |
const char * | zone_name, | ||
const char * | DSSubmitCmd | ||
) |
Definition at line 1636 of file enforcer.c.
References KSM_KEYDATA::algorithm, DB_KEYDATA_FIELDS, DbHandle(), DbIntQuery(), DQS_COMPARE_EQ, DQS_COMPARE_IN, DQS_COMPARE_NE, DqsConditionInt(), DqsConditionKeyword(), DqsCountInit(), DqsEnd(), DqsFree(), DqsSpecifyInit(), KSM_KEYDATA::keypair_id, KSM_INT_STR_SIZE, KSM_PAR_KSKTTL_CAT, KSM_PAR_KSKTTL_STRING, KSM_STATE_ACTIVE, KSM_STATE_DSPUBLISH, KSM_STATE_DSREADY, KSM_STATE_DSSUB, KSM_STATE_KEYPUBLISH, KSM_STATE_PUBLISH, KSM_STATE_READY, KSM_STATE_RETIRE, KSM_TYPE_KSK, KsmKey(), KsmKeyEnd(), KsmKeyInitSql(), KsmParameterValue(), KsmPolicyIdFromZoneId(), KSM_KEYDATA::location, log_msg(), MemMalloc(), StrAppend(), and StrFree.
Referenced by commGenSignConf().
int read_zonelist_filename | ( | const char * | filename, |
char ** | zone_list_filename | ||
) |
Definition at line 1370 of file enforcer.c.
References log_msg(), StrAppend(), and StrFree.
Referenced by cmd_addzone(), cmd_delzone(), cmd_listzone(), and do_communication().
int server_init | ( | DAEMONCONFIG * | config | ) |
Definition at line 63 of file enforcer.c.
References log_msg(), and DAEMONCONFIG::pidfile.
void server_main | ( | DAEMONCONFIG * | config | ) |
Definition at line 82 of file enforcer.c.
References check_hsm_connection(), DAEMONCONFIG::configfile, DbFlavour(), DbFreeResult(), do_communication(), do_keygen(), do_purge(), get_lite_lock(), DAEMONCONFIG::interval, kaspConnect(), kaspDisconnect(), kaspReadPolicy(), kaspSetPolicyDefaults(), kaspTryConnect(), KsmParameterCollectionCache(), KsmPolicy(), KsmPolicyAlloc(), KsmPolicyExists(), KsmPolicyFree(), KsmPolicyInit(), KsmPolicyUpdateSalt(), log_msg(), DAEMONCONFIG::manualKeyGeneration, DAEMONCONFIG::once, DAEMONCONFIG::pidfile, DAEMONCONFIG::policy, ReadConfig(), release_lite_lock(), DAEMONCONFIG::schema, SQLITE_DB, StrAppend(), StrFree, DAEMONCONFIG::term, and writepid().