OpenDNSSEC-signer  2.0.2
Data Structures | Typedefs | Functions
keys.h File Reference
#include <ldns/ldns.h>
#include "status.h"
#include "libhsm.h"
#include "libhsmdns.h"
#include "signconf.h"

Go to the source code of this file.

Data Structures

struct  key_struct
 
struct  keylist_struct
 

Typedefs

typedef struct key_struct key_type
 
typedef struct keylist_struct keylist_type
 

Functions

keylist_typekeylist_create (signconf_type *sc)
 
key_typekeylist_lookup_by_locator (keylist_type *kl, const char *locator)
 
key_typekeylist_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_typekey_recover2 (FILE *fd, keylist_type *kl)
 
void keylist_backup (FILE *fd, keylist_type *kl, const char *version)
 

Typedef Documentation

§ key_type

typedef struct key_struct key_type

Definition at line 38 of file keys.h.

§ keylist_type

typedef struct keylist_struct keylist_type

Definition at line 39 of file keys.h.

Function Documentation

§ key_recover2()

key_type* key_recover2 ( FILE *  fd,
keylist_type kl 
)

Recover key from backup.

Parameters
[in]fdfile descriptor of key backup file
[in]klkey list to print
Returns
key_type* key

Recover key from backup.

Definition at line 220 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().

§ keylist_backup()

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

Backup key list.

Parameters
[in]fdfile descriptor
[in]klkey list to print
[in]versionversion string

Backup key list.

Definition at line 265 of file keys.c.

Referenced by zone_backup2().

§ keylist_cleanup()

void keylist_cleanup ( keylist_type kl)

Clean up key list.

Parameters
[in]klkey list to clean up

Clean up key list.

Definition at line 180 of file keys.c.

References keylist_struct::count.

Referenced by signconf_cleanup().

§ keylist_create()

keylist_type* keylist_create ( signconf_type signconf)

Create a new key list.

Parameters
[in]scsigner configuration reference
Returns
keylist_type* key list

Create a new key list.

Definition at line 48 of file keys.c.

§ keylist_log()

void keylist_log ( keylist_type kl,
const char *  name 
)

Log key list.

Parameters
[in]klkey list to print
[in]namezone name

Log key list.

Definition at line 147 of file keys.c.

References keylist_struct::count.

§ 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.

Parameters
[in]klkey list
[in]locatorkey locator
Returns
key_type* key if it exists, NULL otherwise

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.

§ 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 keylist.

Parameters
[in]klkey list
[in]locatorstring that identifies location of key
[in]algorithmDNSKEY algorithm field value
[in]flagsDNSKEY flags field value
[in]publishif true, publish key as a DNSKEY
[in]kskif true, sign DNSKEY RRset with this key
[in]zskif true, sign all but DNSKEY RRset with this key
Returns
key_type* key

Push a key to the key list.

Definition at line 95 of file keys.c.

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

Referenced by key_recover2().