OpenDNSSEC-libhsm  1.4.6
libhsmdns.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 .SE (The Internet Infrastructure Foundation).
3  * Copyright (c) 2009 NLNet Labs.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef HSMDNS_H
29 #define HSMDNS_H 1
30 
31 #include <ldns/ldns.h>
32 
33 
35 typedef struct {
37  ldns_algorithm algorithm;
39  uint16_t flags;
41  uint32_t inception;
43  uint32_t expiration;
45  uint16_t keytag;
47  ldns_rdf *owner;
49 
50 
56 
57 
66 void
68 
69 
79 ldns_rr*
81  const ldns_rr_list* rrset,
82  const hsm_key_t *key,
83  const hsm_sign_params_t *sign_params);
84 
85 
95 ldns_rdf *
97  ldns_rdf *name,
98  uint8_t algorithm,
99  uint16_t iterations,
100  uint8_t salt_length,
101  uint8_t *salt);
102 
103 
113 ldns_rr*
115  const hsm_key_t *key,
116  const hsm_sign_params_t *sign_params);
117 
118 
124 int
125 hsm_supported_algorithm(ldns_algorithm algorithm);
126 
127 #endif /* HSMDNS_H */
ldns_rr * hsm_sign_rrset(hsm_ctx_t *ctx, const ldns_rr_list *rrset, const hsm_key_t *key, const hsm_sign_params_t *sign_params)
Definition: libhsm.c:2749
ldns_rdf * owner
Definition: libhsmdns.h:47
ldns_rdf * hsm_nsec3_hash_name(hsm_ctx_t *ctx, ldns_rdf *name, uint8_t algorithm, uint16_t iterations, uint8_t salt_length, uint8_t *salt)
Definition: libhsm.c:2858
hsm_sign_params_t * hsm_sign_params_new()
Definition: libhsm.c:2205
uint32_t inception
Definition: libhsmdns.h:41
uint16_t flags
Definition: libhsmdns.h:39
void hsm_sign_params_free(hsm_sign_params_t *params)
Definition: libhsm.c:2222
uint16_t keytag
Definition: libhsmdns.h:45
ldns_algorithm algorithm
Definition: libhsmdns.h:37
uint32_t expiration
Definition: libhsmdns.h:43
ldns_rr * hsm_get_dnskey(hsm_ctx_t *ctx, const hsm_key_t *key, const hsm_sign_params_t *sign_params)
Definition: libhsm.c:2970
int hsm_supported_algorithm(ldns_algorithm algorithm)
Definition: libhsm.c:3145
ldns_algorithm algorithm
Definition: hsmspeed.c:41