enforcer.c File Reference
`#include "config.h"`
`#include <time.h>`
`#include "libhsm.h"`
`#include "hsmkey/hsm_key_factory.h"`
`#include <libhsmdns.h>`
`#include <ldns/ldns.h>`
`#include "duration.h"`
`#include "log.h"`
`#include "daemon/engine.h"`
`#include "db/zone_db.h"`
`#include "db/policy.h"`
`#include "db/policy_key.h"`
`#include "db/hsm_key.h"`
`#include "db/key_data.h"`
`#include "db/key_dependency.h"`
`#include "db/db_error.h"`
`#include "enforcer/enforcer.h"`

Go to the source code of this file.

## Data Structures

struct | future_key

## Macros

#define | HIDDEN KEY_STATE_STATE_HIDDEN
#define | RUMOURED KEY_STATE_STATE_RUMOURED
#define | OMNIPRESENT KEY_STATE_STATE_OMNIPRESENT
#define | UNRETENTIVE KEY_STATE_STATE_UNRETENTIVE
#define | NA KEY_STATE_STATE_NA
#define | NOKEY_TIMEOUT 60

## Functions

time_t | update (engine_type *engine, db_connection_t *dbconn, zone_db_t *zone, policy_t const *policy, time_t now, int *zone_updated)

## Macro Definition Documentation

## HIDDEN

#define HIDDEN KEY_STATE_STATE_HIDDEN

Definition at line 66 of file enforcer.c.

## NA

#define NA KEY_STATE_STATE_NA

Definition at line 70 of file enforcer.c.

## NOKEY_TIMEOUT

#define NOKEY_TIMEOUT 60

When no key available wait this many seconds before asking again.

Definition at line 75 of file enforcer.c.

## OMNIPRESENT

#define OMNIPRESENT KEY_STATE_STATE_OMNIPRESENT

Definition at line 68 of file enforcer.c.

## RUMOURED

#define RUMOURED KEY_STATE_STATE_RUMOURED

Definition at line 67 of file enforcer.c.

## UNRETENTIVE

#define UNRETENTIVE KEY_STATE_STATE_UNRETENTIVE

Definition at line 69 of file enforcer.c.

## Function Documentation

## update()

time_t update | ( | engine_type * | engine,
|  | db_connection_t * | dbconn,
|  | zone_db_t * | zone,
|  | policy_t const * | policy,
|  | time_t | now,
|  | int * | zone_updated
| ) |  |

Does any required work for a zone and its policy.

Does any required work for a zone and its policy. insert new keys, check state of current keys and trashes old ones. Returns the earliest time at which this zone needs attention. When no further attention is needed return -1; Another date in the past simply means ASAP. The function MAY be called again for this zone sooner than indicated. This is however pointless unless some external event happened that influenced this zone/policy/keys.

Parameters

  [in] | zone |
  [in] | now |
  [in] | keyfactory |

Returns
  time_t Time the function wishes to be called again.

Definition at line 2678 of file enforcer.c.

References engine_struct::config, future_key::key, key_data_active_ksk(), key_data_active_zsk(), key_data_cache_hsm_key(), key_data_cache_key_states(), key_data_cached_dnskey(), key_data_cached_rrsig(), key_data_cached_rrsigdnskey(), key_data_free(), key_data_list_begin(), key_data_list_free(), key_data_list_get_begin(), key_data_list_get_next(), key_data_list_next(), key_data_list_size(), key_data_publish(), key_data_set_active_ksk(), key_data_set_active_zsk(), key_data_set_publish(), key_data_update(), key_dependency_list_free(), OMNIPRESENT, policy_keys_purge_after(), engineconfig_struct::rollover_notification, RUMOURED, zone_db_get_key_dependencies(), zone_db_get_keys(), zone_db_name(), zone_db_next_csk_roll(), and zone_db_next_ksk_roll().