OpenDNSSEC-enforcer
1.4.10
|
#include <stdio.h>
#include <limits.h>
#include "ksm/database.h"
#include "ksm/db_fields.h"
#include "ksm/debug.h"
#include "ksm/ksm.h"
#include "ksm/kmedef.h"
#include "ksm/ksmdef.h"
#include "ksm/message.h"
Go to the source code of this file.
Macros | |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
Functions | |
int | KsmUpdate (int policy_id, int zone_id) |
void | KsmUpdateKey (KSM_KEYDATA *data, KSM_PARCOLL *collection, int zone_id) |
void | KsmUpdateGenerateKeyTime (KSM_KEYDATA *data) |
void | KsmUpdatePublishKeyTime (KSM_KEYDATA *data, KSM_PARCOLL *collection, int zone_id) |
void | KsmUpdateReadyKeyTime (KSM_KEYDATA *data, KSM_PARCOLL *collection, int zone_id) |
void | KsmUpdateActiveKeyTime (KSM_KEYDATA *data, KSM_PARCOLL *collection, int zone_id) |
void | KsmUpdateRetireKeyTime (KSM_KEYDATA *data, KSM_PARCOLL *collection, int zone_id) |
void | KsmUpdateDeadKeyTime (KSM_KEYDATA *data) |
void | KsmUpdateDSPublishKeyTime (KSM_KEYDATA *data, KSM_PARCOLL *collection, int zone_id) |
void | KsmUpdateKEYPublishKeyTime (KSM_KEYDATA *data, KSM_PARCOLL *collection, int zone_id) |
int | KsmUpdateKeyTime (const KSM_KEYDATA *data, const char *source, const char *destination, int interval, int zone_id) |
#define MAX | ( | a, | |
b | |||
) | ((a) > (b) ? (a) : (b)) |
Definition at line 52 of file ksm_update.c.
Referenced by KsmUpdatePublishKeyTime().
#define MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
Definition at line 53 of file ksm_update.c.
int KsmUpdate | ( | int | policy_id, |
int | zone_id | ||
) |
Definition at line 70 of file ksm_update.c.
References DQS_QUERY_CONDITION::code, DQS_QUERY_CONDITION::compare, DQS_QUERY_CONDITION::data, DB_KEYDATA_ZONE_ID, DQS_COMPARE_EQ, DQS_END_OF_LIST, KsmCollectionInit(), KsmKey(), KsmKeyEnd(), KsmKeyInit(), KsmParameterCollection(), KsmUpdateKey(), and DQS_QUERY_CONDITION::number.
Referenced by KsmRequestKeys().
void KsmUpdateActiveKeyTime | ( | KSM_KEYDATA * | data, |
KSM_PARCOLL * | collection, | ||
int | zone_id | ||
) |
Definition at line 327 of file ksm_update.c.
References DBG_M_UPDATE, DbgOutput(), KSM_KEYDATA::fixedDate, KSM_KEYDATA::keypair_id, KSM_KEYDATA::keytype, KSM_PARCOLL::ksklife, KSM_INVARG, KSM_TYPE_KSK, KSM_TYPE_ZSK, KsmUpdateKeyTime(), MsgLog(), and KSM_PARCOLL::zsklife.
Referenced by KsmUpdateKey().
void KsmUpdateDeadKeyTime | ( | KSM_KEYDATA * | data | ) |
Definition at line 432 of file ksm_update.c.
References DBG_M_UPDATE, DbgOutput(), KSM_KEYDATA::keypair_id, KSM_INVARG, and MsgLog().
Referenced by KsmUpdateKey().
void KsmUpdateDSPublishKeyTime | ( | KSM_KEYDATA * | data, |
KSM_PARCOLL * | collection, | ||
int | zone_id | ||
) |
Definition at line 451 of file ksm_update.c.
References DBG_M_UPDATE, DbgOutput(), KSM_KEYDATA::keypair_id, KSM_KEYDATA::keytype, KSM_PARCOLL::kskpropdelay, KSM_PARCOLL::kskttl, KSM_INVARG, KSM_TYPE_KSK, KSM_TYPE_ZSK, KsmUpdateKeyTime(), MsgLog(), and KSM_PARCOLL::pub_safety.
Referenced by KsmUpdateKey().
void KsmUpdateGenerateKeyTime | ( | KSM_KEYDATA * | data | ) |
Definition at line 222 of file ksm_update.c.
References DBG_M_UPDATE, DbgOutput(), KSM_KEYDATA::keypair_id, KSM_INVARG, and MsgLog().
Referenced by KsmUpdateKey().
void KsmUpdateKey | ( | KSM_KEYDATA * | data, |
KSM_PARCOLL * | collection, | ||
int | zone_id | ||
) |
Definition at line 150 of file ksm_update.c.
References KSM_KEYDATA::keypair_id, KME_UNRKEYSTA, KSM_INVARG, KSM_STATE_ACTIVE, KSM_STATE_DEAD, KSM_STATE_DSPUBLISH, KSM_STATE_DSREADY, KSM_STATE_DSSUB, KSM_STATE_GENERATE, KSM_STATE_KEYPUBLISH, KSM_STATE_PUBLISH, KSM_STATE_READY, KSM_STATE_RETIRE, KsmUpdateActiveKeyTime(), KsmUpdateDeadKeyTime(), KsmUpdateDSPublishKeyTime(), KsmUpdateGenerateKeyTime(), KsmUpdateKEYPublishKeyTime(), KsmUpdatePublishKeyTime(), KsmUpdateReadyKeyTime(), KsmUpdateRetireKeyTime(), MsgLog(), KSM_KEYDATA::rfc5011, and KSM_KEYDATA::state.
Referenced by KsmUpdate().
void KsmUpdateKEYPublishKeyTime | ( | KSM_KEYDATA * | data, |
KSM_PARCOLL * | collection, | ||
int | zone_id | ||
) |
Definition at line 497 of file ksm_update.c.
References DBG_M_UPDATE, DbgOutput(), KSM_KEYDATA::keypair_id, KSM_INVARG, KsmUpdateKeyTime(), MsgLog(), KSM_PARCOLL::propdelay, KSM_PARCOLL::pub_safety, and KSM_PARCOLL::zskttl.
Referenced by KsmUpdateKey().
int KsmUpdateKeyTime | ( | const KSM_KEYDATA * | data, |
const char * | source, | ||
const char * | destination, | ||
int | interval, | ||
int | zone_id | ||
) |
Definition at line 561 of file ksm_update.c.
References DbExecuteSqlNoResult(), DbHandle(), KSM_KEYDATA::keypair_id, KME_BUFFEROVF, KSM_INVARG, KSM_SQL_SIZE, and MsgLog().
Referenced by KsmUpdateActiveKeyTime(), KsmUpdateDSPublishKeyTime(), KsmUpdateKEYPublishKeyTime(), KsmUpdatePublishKeyTime(), KsmUpdateReadyKeyTime(), and KsmUpdateRetireKeyTime().
void KsmUpdatePublishKeyTime | ( | KSM_KEYDATA * | data, |
KSM_PARCOLL * | collection, | ||
int | zone_id | ||
) |
Definition at line 240 of file ksm_update.c.
References DBG_M_UPDATE, DbgOutput(), KSM_KEYDATA::keypair_id, KSM_KEYDATA::keytype, KSM_PARCOLL::kskpropdelay, KSM_PARCOLL::kskroll, KSM_PARCOLL::kskttl, KSM_INVARG, KSM_ROLL_DNSKEY, KSM_ROLL_DS, KSM_TYPE_KSK, KSM_TYPE_ZSK, KsmUpdateKeyTime(), MAX, MsgLog(), KSM_PARCOLL::propdelay, KSM_PARCOLL::pub_safety, KSM_PARCOLL::rfc5011, RFC5011_ADD_HOLDDOWN_TIME, and KSM_PARCOLL::zskttl.
Referenced by KsmUpdateKey().
void KsmUpdateReadyKeyTime | ( | KSM_KEYDATA * | data, |
KSM_PARCOLL * | collection, | ||
int | zone_id | ||
) |
Definition at line 311 of file ksm_update.c.
References DBG_M_UPDATE, DbgOutput(), KSM_KEYDATA::keypair_id, KSM_INVARG, KsmUpdateKeyTime(), MsgLog(), and KSM_KEYDATA::rfc5011.
Referenced by KsmUpdateKey().
void KsmUpdateRetireKeyTime | ( | KSM_KEYDATA * | data, |
KSM_PARCOLL * | collection, | ||
int | zone_id | ||
) |
Definition at line 377 of file ksm_update.c.
References DBG_M_UPDATE, DbgOutput(), KSM_KEYDATA::dead, KSM_PARCOLL::dsttl, KSM_KEYDATA::fixedDate, KSM_KEYDATA::keypair_id, KSM_KEYDATA::keytype, KSM_PARCOLL::kskpropdelay, KSM_INVARG, KSM_TYPE_KSK, KSM_TYPE_ZSK, KsmUpdateKeyTime(), MsgLog(), KSM_PARCOLL::propdelay, KSM_PARCOLL::ret_safety, KSM_KEYDATA::rfc5011, RFC5011_REM_HOLDDOWN_TIME, and KSM_PARCOLL::zsksiglife.
Referenced by KsmUpdateKey().