ldns documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

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
9 extern "C" {
10 #endif
11
12 /* sign functions */
13
15 #define LDNS_SIGN_DNSKEY_WITH_ZSK 1
16
23 ldns_rr *
24 ldns_create_empty_rrsig(ldns_rr_list *rrset,
25 ldns_key *key);
26
34 ldns_rdf *
35 ldns_sign_public_buffer(ldns_buffer *sign_buf, ldns_key *key);
36
43 ldns_rr_list *ldns_sign_public(ldns_rr_list *rrset, ldns_key_list *keys);
44
45 #if LDNS_BUILD_CONFIG_HAVE_SSL
46
52 ldns_rdf *ldns_sign_public_dsa(ldns_buffer *to_sign, DSA *key);
53
64 ldns_rdf *ldns_sign_public_evp(ldns_buffer *to_sign,
65 EVP_PKEY *key,
66 const EVP_MD *digest_type);
67
74 ldns_rdf *ldns_sign_public_rsasha1(ldns_buffer *to_sign, RSA *key);
75
82 ldns_rdf *ldns_sign_public_rsamd5(ldns_buffer *to_sign, RSA *key);
83 #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */
84
99 ldns_status
100 ldns_dnssec_zone_mark_and_get_glue(
101 ldns_dnssec_zone *zone, ldns_rr_list *glue_list);
102
113 ldns_status
114 ldns_dnssec_zone_mark_glue(ldns_dnssec_zone *zone);
115
124 ldns_rbnode_t *ldns_dnssec_name_node_next_nonglue(ldns_rbnode_t *node);
125
134 ldns_status ldns_dnssec_zone_create_nsecs(ldns_dnssec_zone *zone,
135 ldns_rr_list *new_rrs);
136
140 ldns_status
141 ldns_dnssec_zone_create_nsec3s(ldns_dnssec_zone *zone,
142 ldns_rr_list *new_rrs,
143 uint8_t algorithm,
144 uint8_t flags,
145 uint16_t iterations,
146 uint8_t salt_length,
147 uint8_t *salt);
148
163 ldns_dnssec_rrs *ldns_dnssec_remove_signatures(ldns_dnssec_rrs *signatures,
164 ldns_key_list *key_list,
165 int (*func)(ldns_rr *, void *),
166 void *arg);
167
186 ldns_status ldns_dnssec_zone_create_rrsigs_flg(ldns_dnssec_zone *zone,
187 ldns_rr_list *new_rrs,
188 ldns_key_list *key_list,
189 int (*func)(ldns_rr *, void*),
190 void *arg,
191 int flags);
192
206 ldns_status ldns_dnssec_zone_create_rrsigs(ldns_dnssec_zone *zone,
207 ldns_rr_list *new_rrs,
208 ldns_key_list *key_list,
209 int (*func)(ldns_rr *, void*),
210 void *arg);
211
237 ldns_status ldns_dnssec_zone_sign_flg(ldns_dnssec_zone *zone,
238 ldns_rr_list *new_rrs,
239 ldns_key_list *key_list,
240 int (*func)(ldns_rr *, void *),
241 void *arg,
242 int flags);
243
260 ldns_status ldns_dnssec_zone_sign_nsec3_flg(ldns_dnssec_zone *zone,
261 ldns_rr_list *new_rrs,
262 ldns_key_list *key_list,
263 int (*func)(ldns_rr *, void *),
264 void *arg,
265 uint8_t algorithm,
266 uint8_t flags,
267 uint16_t iterations,
268 uint8_t salt_length,
269 uint8_t *salt,
270 int signflags);
271
291 ldns_status ldns_dnssec_zone_sign_nsec3_flg_mkmap(ldns_dnssec_zone *zone,
292 ldns_rr_list *new_rrs,
293 ldns_key_list *key_list,
294 int (*func)(ldns_rr *, void *),
295 void *arg,
296 uint8_t algorithm,
297 uint8_t flags,
298 uint16_t iterations,
299 uint8_t salt_length,
300 uint8_t *salt,
301 int signflags,
302 ldns_rbtree_t **map
303 );
304
305
326 ldns_status ldns_dnssec_zone_sign(ldns_dnssec_zone *zone,
327 ldns_rr_list *new_rrs,
328 ldns_key_list *key_list,
329 int (*func)(ldns_rr *, void *),
330 void *arg);
331
347 ldns_status ldns_dnssec_zone_sign_nsec3(ldns_dnssec_zone *zone,
348 ldns_rr_list *new_rrs,
349 ldns_key_list *key_list,
350 int (*func)(ldns_rr *, void *),
351 void *arg,
352 uint8_t algorithm,
353 uint8_t flags,
354 uint16_t iterations,
355 uint8_t salt_length,
356 uint8_t *salt);
357
364 ldns_zone *ldns_zone_sign(const ldns_zone *zone, ldns_key_list *key_list);
365
377 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);
378
379 #ifdef __cplusplus
380 }
381 #endif
382
383 #endif
ldns_struct_buffer
implementation of buffers to ease operations
Definition: buffer.h:50
ldns_sign_public_buffer
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...
Definition: dnssec_sign.c:120
ldns_dnssec_zone_mark_and_get_glue
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.
Definition: dnssec_sign.c:579
ldns_zone_sign
ldns_zone * ldns_zone_sign(const ldns_zone *zone, ldns_key_list *key_list)
Signs the zone, and returns a newly allocated signed zone.
Definition: dnssec_sign.c:1369
ldns_struct_rr_list
List or Set of Resource Records.
Definition: rr.h:327
ldns_dnssec_zone_create_nsec3s
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.
Definition: dnssec_sign.c:904
ldns_struct_zone
DNS Zone.
Definition: zone.h:42
ldns_struct_dnssec_zone
Structure containing a dnssec zone.
Definition: dnssec_zone.h:91
ldns_create_empty_rrsig
ldns_rr * ldns_create_empty_rrsig(ldns_rr_list *rrset, ldns_key *key)
Create an empty RRSIG RR (i.e.
Definition: dnssec_sign.c:23
ldns_struct_rr
Resource Record.
Definition: rr.h:299
ldns_struct_key
General key structure, can contain all types of keys that are used in DNSSEC.
Definition: keys.h:107
ldns_dnssec_remove_signatures
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_rbnode_t
The rbnode_t struct definition.
Definition: rbtree.h:60
ldns_dnssec_zone_sign_nsec3
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
Definition: dnssec_sign.c:1249
ldns_dnssec_zone_sign_flg
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
Definition: dnssec_sign.c:1211
ldns_struct_key_list
Same as rr_list, but now for keys.
Definition: keys.h:157
ldns_zone_sign_nsec3
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.
Definition: dnssec_sign.c:1410
ldns_dnssec_zone_mark_glue
ldns_status ldns_dnssec_zone_mark_glue(ldns_dnssec_zone *zone)
Marks the names in the zone that are occluded.
Definition: dnssec_sign.c:668
ldns_dnssec_zone_sign_nsec3_flg_mkmap
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
Definition: dnssec_sign.c:1266
ldns_rbtree_t
definition for tree struct
Definition: rbtree.h:83
ldns_dnssec_name_node_next_nonglue
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.
Definition: dnssec_sign.c:674
ldns_dnssec_zone_sign
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
Definition: dnssec_sign.c:1201
ldns_status
enum ldns_enum_status ldns_status
Definition: error.h:131
dnssec.h
This module contains base functions for DNSSEC operations (RFC4033 t/m RFC4035).
ldns_sign_public
ldns_rr_list * ldns_sign_public(ldns_rr_list *rrset, ldns_key_list *keys)
Sign an rrset.
Definition: dnssec_sign.c:196
ldns_sign_public_evp
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)
Definition: dnssec_sign.c:397
ldns_dnssec_zone_sign_nsec3_flg
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
Definition: dnssec_sign.c:1351
ldns_sign_public_rsamd5
ldns_rdf * ldns_sign_public_rsamd5(ldns_buffer *to_sign, RSA *key)
Sign a buffer with the RSA key (hash with MD5)
Definition: dnssec_sign.c:501
ldns_struct_rdf
Resource record data field.
Definition: rdata.h:166
ldns_sign_public_dsa
ldns_rdf * ldns_sign_public_dsa(ldns_buffer *to_sign, DSA *key)
Sign a buffer with the DSA key (hash with SHA1)
Definition: dnssec_sign.c:309
ldns_sign_public_rsasha1
ldns_rdf * ldns_sign_public_rsasha1(ldns_buffer *to_sign, RSA *key)
Sign a buffer with the RSA key (hash with SHA1)
Definition: dnssec_sign.c:465
ldns_dnssec_zone_create_rrsigs_flg
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.
Definition: dnssec_sign.c:1058
ldns_dnssec_zone_create_nsecs
ldns_status ldns_dnssec_zone_create_nsecs(ldns_dnssec_zone *zone, ldns_rr_list *new_rrs)
Adds NSEC records to the given dnssec_zone.
Definition: dnssec_sign.c:700
ldns_struct_dnssec_rrs
Definition: dnssec_zone.h:22
ldns_dnssec_zone_create_rrsigs
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.
Definition: dnssec_sign.c:1010