keys.c File Reference
`#include "file.h"`
`#include "log.h"`
`#include "util.h"`
`#include "signer/backup.h"`
`#include "signer/keys.h"`
`#include "signer/signconf.h"`
`#include "status.h"`

Go to the source code of this file.

## Functions

keylist_type * | keylist_create (signconf_type *signconf)
key_type * | keylist_lookup_by_locator (keylist_type *kl, const char *locator)
key_type * | keylist_push (keylist_type *kl, const char *locator, const char *resourcerecord, uint8_t algorithm, uint32_t flags, int publish, int ksk, int zsk)
void | keylist_log (keylist_type *kl, const char *name)
void | keylist_cleanup (keylist_type *kl)
key_type * | key_recover2 (FILE *fd, keylist_type *kl)
void | keylist_backup (FILE *fd, keylist_type *kl, const char *version)

## Function Documentation

## key_recover2()

key_type * key_recover2 | ( | FILE * | fd,
|  | keylist_type * | kl )

Recover key from backup.

Definition at line 223 of file keys.c.

References backup_read_check_str(), backup_read_int(), backup_read_str(), backup_read_uint32_t(), backup_read_uint8_t(), and keylist_push().

Referenced by zone_recover2().

## keylist_backup()

void keylist_backup | ( | FILE * | fd,
|  | keylist_type * | kl,
|  | const char * | version )

Backup key list.

Definition at line 268 of file keys.c.

References keylist_struct::count, and keylist_struct::keys.

Referenced by zone_backup2().

## keylist_cleanup()

void keylist_cleanup | ( | keylist_type * | kl | ) |

Clean up key list.

Definition at line 183 of file keys.c.

References keylist_struct::count, and keylist_struct::keys.

Referenced by signconf_cleanup().

## keylist_create()

keylist_type * keylist_create | ( | signconf_type * | signconf | ) |

Create a new key list.

Definition at line 48 of file keys.c.

References keylist_struct::count, keylist_struct::keys, and keylist_struct::sc.

Referenced by parse_sc_keys(), and zone_recover2().

## keylist_log()

void keylist_log | ( | keylist_type * | kl,
|  | const char * | name )

Log key list.

Definition at line 147 of file keys.c.

References keylist_struct::count, and keylist_struct::keys.

Referenced by signconf_log().

## keylist_lookup_by_locator()

key_type * keylist_lookup_by_locator | ( | keylist_type * | kl,
|  | const char * | locator )

Lookup a key in the key list by locator.

Definition at line 73 of file keys.c.

References keylist_struct::count, keylist_struct::keys, and key_struct::locator.

Referenced by parse_sc_keys().

## keylist_push()

key_type * keylist_push | ( | keylist_type * | kl,
|  | const char * | locator,
|  | const char * | resourcerecord,
|  | uint8_t | algorithm,
|  | uint32_t | flags,
|  | int | publish,
|  | int | ksk,
|  | int | zsk )

Push a key to the key list.

Definition at line 95 of file keys.c.

References key_struct::algorithm, keylist_struct::count, key_struct::dnskey, key_struct::flags, keylist_struct::keys, key_struct::ksk, key_struct::locator, key_struct::params, key_struct::publish, key_struct::resourcerecord, and key_struct::zsk.

Referenced by key_recover2(), and parse_sc_keys().