ldns  1.7.0
dnssec_sign.h
Go to the documentation of this file.
1
3#ifndef LDNS_DNSSEC_SIGN_H
4#define LDNS_DNSSEC_SIGN_H
5
6#include <ldns/dnssec.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12/* sign functions */
13
15#define LDNS_SIGN_DNSKEY_WITH_ZSK 1
16#define LDNS_SIGN_WITH_ALL_ALGORITHMS 2
17#define LDNS_SIGN_NO_KEYS_NO_NSECS 4
18#define LDNS_SIGN_WITH_ZONEMD_SIMPLE_SHA384 8
19#define LDNS_SIGN_WITH_ZONEMD_SIMPLE_SHA512 16
20
27ldns_rr *
29 const ldns_key *key);
30
40
48
49#if LDNS_BUILD_CONFIG_HAVE_SSL
56ldns_rdf *ldns_sign_public_dsa(ldns_buffer *to_sign, DSA *key);
57
69 EVP_PKEY *key,
70 const EVP_MD *digest_type);
71
79
87#endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
88
105 ldns_dnssec_zone *zone, ldns_rr_list *glue_list);
106
119
129
139 ldns_rr_list *new_rrs);
140
146 ldns_rr_list *new_rrs,
147 uint8_t algorithm,
148 uint8_t flags,
149 uint16_t iterations,
150 uint8_t salt_length,
151 uint8_t *salt);
152
168 ldns_key_list *key_list,
169 int (*func)(ldns_rr *, void *),
170 void *arg);
171
191 ldns_rr_list *new_rrs,
192 ldns_key_list *key_list,
193 int (*func)(ldns_rr *, void*),
194 void *arg,
195 int flags);
196
211 ldns_rr_list *new_rrs,
212 ldns_key_list *key_list,
213 int (*func)(ldns_rr *, void*),
214 void *arg);
215
242 ldns_rr_list *new_rrs,
243 ldns_key_list *key_list,
244 int (*func)(ldns_rr *, void *),
245 void *arg,
246 int flags);
247
265 ldns_rr_list *new_rrs,
266 ldns_key_list *key_list,
267 int (*func)(ldns_rr *, void *),
268 void *arg,
269 uint8_t algorithm,
270 uint8_t flags,
271 uint16_t iterations,
272 uint8_t salt_length,
273 uint8_t *salt,
274 int signflags);
275
296 ldns_rr_list *new_rrs,
297 ldns_key_list *key_list,
298 int (*func)(ldns_rr *, void *),
299 void *arg,
300 uint8_t algorithm,
301 uint8_t flags,
302 uint16_t iterations,
303 uint8_t salt_length,
304 uint8_t *salt,
305 int signflags,
306 ldns_rbtree_t **map
307 );
308
309
331 ldns_rr_list *new_rrs,
332 ldns_key_list *key_list,
333 int (*func)(ldns_rr *, void *),
334 void *arg);
335
352 ldns_rr_list *new_rrs,
353 ldns_key_list *key_list,
354 int (*func)(ldns_rr *, void *),
355 void *arg,
356 uint8_t algorithm,
357 uint8_t flags,
358 uint16_t iterations,
359 uint8_t salt_length,
360 uint8_t *salt);
361
368ldns_zone *ldns_zone_sign(const ldns_zone *zone, ldns_key_list *key_list);
369
381ldns_zone *ldns_zone_sign_nsec3(ldns_zone *zone, ldns_key_list *key_list, uint8_t algorithm, uint8_t flags, uint16_t iterations, uint8_t salt_length, uint8_t *salt);
382
383#ifdef __cplusplus
384}
385#endif
386
387#endif
This module contains base functions for DNSSEC operations (RFC4033 t/m RFC4035).
ldns_rdf * ldns_sign_public_evp(ldns_buffer *to_sign, EVP_PKEY *key, const EVP_MD *digest_type)
Sign data with EVP (general method for different algorithms)
ldns_rr_list * ldns_sign_public(ldns_rr_list *rrset, ldns_key_list *keys)
Sign an rrset.
ldns_zone * ldns_zone_sign(const ldns_zone *zone, ldns_key_list *key_list)
Signs the zone, and returns a newly allocated signed zone.
ldns_zone * ldns_zone_sign_nsec3(ldns_zone *zone, ldns_key_list *key_list, uint8_t algorithm, uint8_t flags, uint16_t iterations, uint8_t salt_length, uint8_t *salt)
Signs the zone with NSEC3, and returns a newly allocated signed zone.
ldns_status ldns_dnssec_zone_mark_glue(ldns_dnssec_zone *zone)
Marks the names in the zone that are occluded.
ldns_status ldns_dnssec_zone_mark_and_get_glue(ldns_dnssec_zone *zone, ldns_rr_list *glue_list)
Marks the names in the zone that are occluded.
ldns_status ldns_dnssec_zone_create_nsec3s(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, uint8_t algorithm, uint8_t flags, uint16_t iterations, uint8_t salt_length, uint8_t *salt)
Adds NSEC3 records to the zone.
ldns_status ldns_dnssec_zone_sign(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int(*func)(ldns_rr *, void *), void *arg)
signs the given zone with the given keys
ldns_status ldns_dnssec_zone_sign_nsec3_flg(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int(*func)(ldns_rr *, void *), void *arg, uint8_t algorithm, uint8_t flags, uint16_t iterations, uint8_t salt_length, uint8_t *salt, int signflags)
signs the given zone with the given new zone, with NSEC3
ldns_rdf * ldns_sign_public_rsasha1(ldns_buffer *to_sign, RSA *key)
Sign a buffer with the RSA key (hash with SHA1)
ldns_status ldns_dnssec_zone_create_rrsigs(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int(*func)(ldns_rr *, void *), void *arg)
Adds signatures to the zone.
ldns_rdf * ldns_sign_public_rsamd5(ldns_buffer *to_sign, RSA *key)
Sign a buffer with the RSA key (hash with MD5)
ldns_status ldns_dnssec_zone_sign_nsec3_flg_mkmap(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int(*func)(ldns_rr *, void *), void *arg, uint8_t algorithm, uint8_t flags, uint16_t iterations, uint8_t salt_length, uint8_t *salt, int signflags, ldns_rbtree_t **map)
signs the given zone with the given new zone, with NSEC3
ldns_rdf * ldns_sign_public_buffer(ldns_buffer *sign_buf, ldns_key *key)
Sign the buffer which contains the wiredata of an rrset, and the corresponding empty rrsig rr with th...
ldns_rbnode_t * ldns_dnssec_name_node_next_nonglue(ldns_rbnode_t *node)
Finds the first dnssec_name node in the rbtree that is not occluded.
ldns_status ldns_dnssec_zone_sign_flg(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int(*func)(ldns_rr *, void *), void *arg, int flags)
signs the given zone with the given keys
ldns_dnssec_rrs * ldns_dnssec_remove_signatures(ldns_dnssec_rrs *signatures, ldns_key_list *key_list, int(*func)(ldns_rr *, void *), void *arg)
remove signatures if callback function tells to
ldns_rdf * ldns_sign_public_dsa(ldns_buffer *to_sign, DSA *key)
Sign a buffer with the DSA key (hash with SHA1)
ldns_rr * ldns_create_empty_rrsig(const ldns_rr_list *rrset, const ldns_key *key)
Create an empty RRSIG RR (i.e.
Definition dnssec_sign.c:31
ldns_status ldns_dnssec_zone_create_nsecs(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs)
Adds NSEC records to the given dnssec_zone.
ldns_status ldns_dnssec_zone_sign_nsec3(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int(*func)(ldns_rr *, void *), void *arg, uint8_t algorithm, uint8_t flags, uint16_t iterations, uint8_t salt_length, uint8_t *salt)
signs the given zone with the given new zone, with NSEC3
ldns_status ldns_dnssec_zone_create_rrsigs_flg(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs, ldns_key_list *key_list, int(*func)(ldns_rr *, void *), void *arg, int flags)
Adds signatures to the zone.
enum ldns_enum_status ldns_status
Definition error.h:146
The rbnode_t struct definition.
Definition rbtree.h:60
definition for tree struct
Definition rbtree.h:83
implementation of buffers to ease operations
Definition buffer.h:51
Structure containing a dnssec zone.
Definition dnssec_zone.h:91
Same as rr_list, but now for keys.
Definition keys.h:181
General key structure, can contain all types of keys that are used in DNSSEC.
Definition keys.h:130
Resource record data field.
Definition rdata.h:196
List or Set of Resource Records.
Definition rr.h:338
Resource Record.
Definition rr.h:310
DNS Zone.
Definition zone.h:43