OpenDNSSEC-signer
2.1.6
src
signer
keys.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 NLNet Labs. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
6
* are met:
7
* 1. Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* 2. Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
12
*
13
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
17
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
19
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
21
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
23
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
*
25
*/
26
27
#ifndef SIGNER_KEYS_H
28
#define SIGNER_KEYS_H
29
30
#ifdef HAVE_SYS_TYPES_H
31
# include <sys/types.h>
32
#endif
33
#ifdef HAVE_UNISTD_H
34
# include <unistd.h>
35
#endif
36
#include <ldns/ldns.h>
37
38
typedef
struct
key_struct
key_type
;
39
typedef
struct
keylist_struct
keylist_type
;
40
41
#include "status.h"
42
#include "libhsm.h"
43
#include "libhsmdns.h"
44
#include "
signconf.h
"
45
50
struct
key_struct
{
51
ldns_rr*
dnskey
;
52
hsm_sign_params_t*
params
;
53
const
char
*
locator
;
54
const
char
*
resourcerecord
;
55
uint8_t
algorithm
;
56
uint32_t
flags
;
57
int
publish
;
58
int
ksk
;
59
int
zsk
;
60
};
61
66
struct
keylist_struct
{
67
signconf_type
*
sc
;
68
key_type
*
keys
;
69
size_t
count
;
70
};
71
78
keylist_type
*
keylist_create
(
signconf_type
* sc);
79
87
key_type
*
keylist_lookup_by_locator
(
keylist_type
* kl,
const
char
* locator);
88
101
key_type
*
keylist_push
(
keylist_type
* kl,
const
char
* locator,
const
char
* resourcerecord,
102
uint8_t algorithm, uint32_t flags,
int
publish,
int
ksk,
int
zsk);
103
110
void
keylist_log
(
keylist_type
* kl,
const
char
* name);
111
117
void
keylist_cleanup
(
keylist_type
* kl);
118
126
key_type
*
key_recover2
(FILE* fd,
keylist_type
* kl);
127
135
void
keylist_backup
(FILE* fd,
keylist_type
* kl,
const
char
* version);
136
137
#endif
/* SIGNER_KEYS_H */
key_struct::flags
uint32_t flags
Definition:
keys.h:56
keylist_struct
Definition:
keys.h:66
key_struct::resourcerecord
const char * resourcerecord
Definition:
keys.h:54
keylist_log
void keylist_log(keylist_type *kl, const char *name)
Definition:
keys.c:147
key_struct::algorithm
uint8_t algorithm
Definition:
keys.h:55
signconf.h
keylist_cleanup
void keylist_cleanup(keylist_type *kl)
Definition:
keys.c:183
keylist_struct::count
size_t count
Definition:
keys.h:69
key_struct::dnskey
ldns_rr * dnskey
Definition:
keys.h:51
key_struct::ksk
int ksk
Definition:
keys.h:58
key_struct
Definition:
keys.h:50
key_recover2
key_type * key_recover2(FILE *fd, keylist_type *kl)
Definition:
keys.c:223
keylist_lookup_by_locator
key_type * keylist_lookup_by_locator(keylist_type *kl, const char *locator)
Definition:
keys.c:73
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)
Definition:
keys.c:95
key_struct::publish
int publish
Definition:
keys.h:57
key_struct::locator
const char * locator
Definition:
keys.h:53
signconf_struct
Definition:
signconf.h:41
keylist_backup
void keylist_backup(FILE *fd, keylist_type *kl, const char *version)
Definition:
keys.c:268
keylist_struct::keys
key_type * keys
Definition:
keys.h:68
keylist_create
keylist_type * keylist_create(signconf_type *sc)
Definition:
keys.c:48
key_struct::params
hsm_sign_params_t * params
Definition:
keys.h:52
key_struct::zsk
int zsk
Definition:
keys.h:59
keylist_struct::sc
signconf_type * sc
Definition:
keys.h:67
Generated by
1.8.18