OpenDNSSEC-signer  1.4.10
signconf.c
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 
32 #include "parser/signconfparser.h"
33 #include "shared/duration.h"
34 #include "shared/file.h"
35 #include "shared/log.h"
36 #include "shared/status.h"
37 #include "signer/signconf.h"
38 
39 static const char* sc_str = "signconf";
40 
41 
48 {
49  signconf_type* sc = NULL;
50  allocator_type* allocator = allocator_create(malloc, free);
51  if (!allocator) {
52  ods_log_error("[%s] unable to create signconf: allocator_create() "
53  " failed", sc_str);
54  return NULL;
55  }
56  sc = (signconf_type*) allocator_alloc(allocator, sizeof(signconf_type));
57  if (!sc) {
58  ods_log_error("[%s] unable to create signconf: allocator_alloc() "
59  " failed", sc_str);
60  allocator_cleanup(allocator);
61  return NULL;
62  }
63  sc->allocator = allocator;
64  sc->filename = NULL;
65  /* Signatures */
66  sc->sig_resign_interval = NULL;
67  sc->sig_refresh_interval = NULL;
68  sc->sig_validity_default = NULL;
69  sc->sig_validity_denial = NULL;
70  sc->sig_jitter = NULL;
71  sc->sig_inception_offset = NULL;
72  /* Denial of existence */
73  sc->nsec3param_ttl = NULL;
74  sc->nsec_type = 0;
75  sc->nsec3_optout = 0;
76  sc->nsec3_algo = 0;
77  sc->nsec3_iterations = 0;
78  sc->nsec3_salt = NULL;
79  sc->nsec3params = NULL;
80  /* Keys */
81  sc->dnskey_ttl = NULL;
82  sc->keys = NULL;
83  /* Source of authority */
84  sc->soa_ttl = NULL;
85  sc->soa_min = NULL;
86  sc->soa_serial = NULL;
87  /* Other useful information */
88  sc->last_modified = 0;
89  return sc;
90 }
91 
92 
97 static ods_status
98 signconf_read(signconf_type* signconf, const char* scfile)
99 {
100  const char* rngfile = ODS_SE_RNGDIR "/signconf.rng";
101  ods_status status = ODS_STATUS_OK;
102  FILE* fd = NULL;
103 
104  if (!scfile || !signconf) {
105  return ODS_STATUS_ASSERT_ERR;
106  }
107  ods_log_debug("[%s] read signconf file %s", sc_str, scfile);
108  status = parse_file_check(scfile, rngfile);
109  if (status != ODS_STATUS_OK) {
110  ods_log_error("[%s] unable to read signconf: parse error in "
111  "file %s (%s)", sc_str, scfile, ods_status2str(status));
112  return status;
113  }
114  fd = ods_fopen(scfile, NULL, "r");
115  if (fd) {
116  signconf->filename = allocator_strdup(signconf->allocator, scfile);
121  signconf->sig_jitter = parse_sc_sig_jitter(scfile);
123  signconf->nsec_type = parse_sc_nsec_type(scfile);
124  if (signconf->nsec_type == LDNS_RR_TYPE_NSEC3) {
125  signconf->nsec3param_ttl = parse_sc_nsec3param_ttl(scfile);
126  signconf->nsec3_optout = parse_sc_nsec3_optout(scfile);
127  signconf->nsec3_algo = parse_sc_nsec3_algorithm(scfile);
128  signconf->nsec3_iterations = parse_sc_nsec3_iterations(scfile);
129  signconf->nsec3_salt = parse_sc_nsec3_salt(signconf->allocator,
130  scfile);
131  signconf->nsec3params = nsec3params_create((void*) signconf,
132  (uint8_t) signconf->nsec3_algo, (uint8_t) signconf->nsec3_optout,
133  (uint16_t)signconf->nsec3_iterations, signconf->nsec3_salt);
134  if (!signconf->nsec3params) {
135  ods_log_error("[%s] unable to read signconf %s: "
136  "nsec3params_create() failed", sc_str, scfile);
137  ods_fclose(fd);
138  return ODS_STATUS_MALLOC_ERR;
139  }
140  }
141  signconf->keys = parse_sc_keys((void*) signconf, scfile);
142  signconf->dnskey_ttl = parse_sc_dnskey_ttl(scfile);
143  signconf->soa_ttl = parse_sc_soa_ttl(scfile);
144  signconf->soa_min = parse_sc_soa_min(scfile);
145  signconf->soa_serial = parse_sc_soa_serial(signconf->allocator,
146  scfile);
147  ods_fclose(fd);
148  return ODS_STATUS_OK;
149  }
150  ods_log_error("[%s] unable to read signconf: failed to open file %s",
151  sc_str, scfile);
152  return ODS_STATUS_ERR;
153 }
154 
155 
161 signconf_update(signconf_type** signconf, const char* scfile,
162  time_t last_modified)
163 {
164  signconf_type* new_sc = NULL;
165  time_t st_mtime = 0;
166  ods_status status = ODS_STATUS_OK;
167 
168  if (!scfile || !signconf) {
169  return ODS_STATUS_UNCHANGED;
170  }
171  /* is the file updated? */
172  st_mtime = ods_file_lastmodified(scfile);
173  if (st_mtime <= last_modified) {
174  return ODS_STATUS_UNCHANGED;
175  }
176  /* if so, read the new signer configuration */
177  new_sc = signconf_create();
178  if (!new_sc) {
179  ods_log_error("[%s] unable to update signconf: signconf_create() "
180  "failed", sc_str);
181  return ODS_STATUS_ERR;
182  }
183  status = signconf_read(new_sc, scfile);
184  if (status == ODS_STATUS_OK) {
185  new_sc->last_modified = st_mtime;
186  if (signconf_check(new_sc) != ODS_STATUS_OK) {
187  ods_log_error("[%s] unable to update signconf: signconf %s has "
188  "errors", sc_str, scfile);
189  signconf_cleanup(new_sc);
190  return ODS_STATUS_CFG_ERR;
191  }
192  *signconf = new_sc;
193  } else {
194  ods_log_error("[%s] unable to update signconf: failed to read file "
195  "%s (%s)", sc_str, scfile, ods_status2str(status));
196  signconf_cleanup(new_sc);
197  }
198  return status;
199 }
200 
201 
206 static void
207 signconf_backup_duration(FILE* fd, const char* opt, duration_type* duration)
208 {
209  char* str = duration2string(duration);
210  fprintf(fd, "%s %s ", opt, str);
211  free((void*) str?str:"(null)");
212  return;
213 }
214 
215 
216 
221 void
222 signconf_backup(FILE* fd, signconf_type* sc, const char* version)
223 {
224  if (!fd || !sc) {
225  return;
226  }
227  fprintf(fd, ";;Signconf: lastmod %u ", (unsigned) sc->last_modified);
228  if (strcmp(version, ODS_SE_FILE_MAGIC_V2) &&
229  strcmp(version, ODS_SE_FILE_MAGIC_V1)) {
230  /* version 3 and up */
231  fprintf(fd, "maxzonettl 0 "); /* prepare for enforcer ng */
232  }
233  signconf_backup_duration(fd, "resign", sc->sig_resign_interval);
234  signconf_backup_duration(fd, "refresh", sc->sig_refresh_interval);
235  signconf_backup_duration(fd, "valid", sc->sig_validity_default);
236  signconf_backup_duration(fd, "denial", sc->sig_validity_denial);
237  signconf_backup_duration(fd, "jitter", sc->sig_jitter);
238  signconf_backup_duration(fd, "offset", sc->sig_inception_offset);
239  fprintf(fd, "nsec %u ", (unsigned) sc->nsec_type);
240  signconf_backup_duration(fd, "dnskeyttl", sc->dnskey_ttl);
241  signconf_backup_duration(fd, "soattl", sc->soa_ttl);
242  signconf_backup_duration(fd, "soamin", sc->soa_min);
243  fprintf(fd, "serial %s ", sc->soa_serial?sc->soa_serial:"(null)");
244  if (strcmp(version, ODS_SE_FILE_MAGIC_V2) == 0) {
245  fprintf(fd, "audit 0");
246  }
247  fprintf(fd, "\n");
248  return;
249 }
250 
251 
256 static int
257 signconf_soa_serial_check(const char* serial) {
258  if (!serial) {
259  return 1;
260  }
261 
262  if (strlen(serial) == 4 && strncmp(serial, "keep", 4) == 0) {
263  return 0;
264  }
265  if (strlen(serial) == 7 && strncmp(serial, "counter", 7) == 0) {
266  return 0;
267  }
268  if (strlen(serial) == 8 && strncmp(serial, "unixtime", 8) == 0) {
269  return 0;
270  }
271  if (strlen(serial) == 11 && strncmp(serial, "datecounter", 11) == 0) {
272  return 0;
273  }
274  return 1;
275 }
276 
277 
284 {
285  ods_status status = ODS_STATUS_OK;
286 
287  if (!sc->sig_resign_interval) {
288  ods_log_error("[%s] check failed: no signature resign interval found",
289  sc_str);
290  status = ODS_STATUS_CFG_ERR;
291  }
292  if (!sc->sig_refresh_interval) {
293  ods_log_error("[%s] check failed: no signature resign interval found",
294  sc_str);
295  status = ODS_STATUS_CFG_ERR;
296  }
297  if (!sc->sig_validity_default) {
298  ods_log_error("[%s] check failed: no signature default validity found",
299  sc_str);
300  status = ODS_STATUS_CFG_ERR;
301  }
302  if (!sc->sig_validity_denial) {
303  ods_log_error("[%s] check failed: no signature denial validity found",
304  sc_str);
305  status = ODS_STATUS_CFG_ERR;
306  }
307  if (!sc->sig_jitter) {
308  ods_log_error("[%s] check failed: no signature jitter found", sc_str);
309  status = ODS_STATUS_CFG_ERR;
310  }
311  if (!sc->sig_inception_offset) {
312  ods_log_error("[%s] check failed: no signature inception offset found",
313  sc_str);
314  status = ODS_STATUS_CFG_ERR;
315  }
316  if (sc->nsec_type == LDNS_RR_TYPE_NSEC3) {
317  if (sc->nsec3_algo != LDNS_SHA1) {
318  ods_log_error("[%s] check failed: invalid nsec3 algorithm",
319  sc_str);
320  status = ODS_STATUS_CFG_ERR;
321  }
322  /* iterations */
323  /* salt */
324  /* optout */
325  } else if (sc->nsec_type != LDNS_RR_TYPE_NSEC) {
326  ods_log_error("[%s] check failed: wrong nsec type %i", sc_str,
327  sc->nsec_type);
328  status = ODS_STATUS_CFG_ERR;
329  }
330  if (!sc->keys || sc->keys->count == 0) {
331  ods_log_error("[%s] check failed: no keys found", sc_str);
332  status = ODS_STATUS_CFG_ERR;
333  }
334  if (!sc->dnskey_ttl) {
335  ods_log_error("[%s] check failed: no dnskey ttl found", sc_str);
336  status = ODS_STATUS_CFG_ERR;
337  }
338  if (!sc->soa_ttl) {
339  ods_log_error("[%s] check failed: no soa ttl found", sc_str);
340  status = ODS_STATUS_CFG_ERR;
341  }
342  if (!sc->soa_min) {
343  ods_log_error("[%s] check failed: no soa minimum found", sc_str);
344  status = ODS_STATUS_CFG_ERR;
345  }
346  if (!sc->soa_serial) {
347  ods_log_error("[%s] check failed: no soa serial type found", sc_str);
348  status = ODS_STATUS_CFG_ERR;
349  } else if (signconf_soa_serial_check(sc->soa_serial) != 0) {
350  ods_log_error("[%s] check failed: wrong soa serial type %s", sc_str,
351  sc->soa_serial);
352  status = ODS_STATUS_CFG_ERR;
353  }
354  return status;
355 }
356 
357 
362 task_id
364 {
365  task_id new_task = TASK_NONE;
366  if (!a || !b) {
367  return TASK_NONE;
368  }
369  ods_log_assert(a);
370  ods_log_assert(b);
371 
372  if (duration_compare(a->soa_min, b->soa_min)) {
373  new_task = TASK_NSECIFY;
374  } else if (a->nsec_type != b->nsec_type) {
375  new_task = TASK_NSECIFY;
376  } else if (a->nsec_type == LDNS_RR_TYPE_NSEC3) {
377  if ((ods_strcmp(a->nsec3_salt, b->nsec3_salt) != 0) ||
378  (a->nsec3_algo != b->nsec3_algo) ||
379  (a->nsec3_iterations != b->nsec3_iterations) ||
380  (a->nsec3_optout != b->nsec3_optout)) {
381 
382  new_task = TASK_NSECIFY;
383  } else if (duration_compare(a->nsec3param_ttl, b->nsec3param_ttl)) {
384  new_task = TASK_READ;
385  }
386  }
387  return new_task;
388 }
389 
390 
395 void
396 signconf_print(FILE* out, signconf_type* sc, const char* name)
397 {
398  char* s = NULL;
399 
400  fprintf(out, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
401  if (sc) {
402  fprintf(out, "<SignerConfiguration>\n");
403  fprintf(out, "\t<Zone name=\"%s\">\n", name?name:"(null)");
404  /* Signatures */
405  fprintf(out, "\t\t<Signatures>\n");
407  fprintf(out, "\t\t\t<Resign>%s</Resign>\n", s?s:"(null)");
408  free((void*)s);
410  fprintf(out, "\t\t\t<Refresh>%s</Refresh>\n", s?s:"(null)");
411  free((void*)s);
412  fprintf(out, "\t\t\t<Validity>\n");
414  fprintf(out, "\t\t\t\t<Default>%s</Default>\n", s?s:"(null)");
415  free((void*)s);
417  fprintf(out, "\t\t\t\t<Denial>%s</Denial>\n", s?s:"(null)");
418  free((void*)s);
419  fprintf(out, "\t\t\t</Validity>\n");
420  s = duration2string(sc->sig_jitter);
421  fprintf(out, "\t\t\t<Jitter>%s</Jitter>\n", s?s:"(null)");
422  free((void*)s);
424  fprintf(out, "\t\t\t<InceptionOffset>%s</InceptionOffset>\n",
425  s?s:"(null)");
426  free((void*)s);
427  fprintf(out, "\t\t</Signatures>\n");
428  fprintf(out, "\n");
429  /* Denial */
430  fprintf(out, "\t\t<Denial>\n");
431  if (sc->nsec_type == LDNS_RR_TYPE_NSEC) {
432  fprintf(out, "\t\t\t<NSEC />\n");
433  } else if (sc->nsec_type == LDNS_RR_TYPE_NSEC3) {
434  fprintf(out, "\t\t\t<NSEC3>\n");
435  if (sc->nsec3param_ttl) {
437  fprintf(out, "\t\t\t\t<TTL>%s</TTL>\n", s?s:"(null)");
438  free((void*)s);
439  }
440  if (sc->nsec3_optout) {
441  fprintf(out, "\t\t\t\t<OptOut />\n");
442  }
443  fprintf(out, "\t\t\t\t<Hash>\n");
444  fprintf(out, "\t\t\t\t\t<Algorithm>%i</Algorithm>\n",
445  sc->nsec3_algo);
446  fprintf(out, "\t\t\t\t\t<Iterations>%i</Iterations>\n",
447  sc->nsec3_iterations);
448  fprintf(out, "\t\t\t\t\t<Salt>%s</Salt>\n",
449  sc->nsec3_salt?sc->nsec3_salt:"(null)");
450  fprintf(out, "\t\t\t\t</Hash>\n");
451  fprintf(out, "\t\t\t</NSEC3>\n");
452  }
453  fprintf(out, "\t\t</Denial>\n");
454  fprintf(out, "\n");
455  /* Keys */
456  fprintf(out, "\t\t<Keys>\n");
457  s = duration2string(sc->dnskey_ttl);
458  fprintf(out, "\t\t\t<TTL>%s</TTL>\n", s?s:"(null)");
459  free((void*)s);
460  fprintf(out, "\n");
461  keylist_print(out, sc->keys);
462  fprintf(out, "\t\t</Keys>\n");
463  fprintf(out, "\n");
464  /* SOA */
465  fprintf(out, "\t\t<SOA>\n");
466  s = duration2string(sc->soa_ttl);
467  fprintf(out, "\t\t\t<TTL>%s</TTL>\n", s?s:"(null)");
468  free((void*)s);
469  s = duration2string(sc->soa_min);
470  fprintf(out, "\t\t\t<Minimum>%s</Minimum>\n", s?s:"(null)");
471  free((void*)s);
472  fprintf(out, "\t\t\t<Serial>%s</Serial>\n",
473  sc->soa_serial?sc->soa_serial:"(null)");
474  fprintf(out, "\t\t</SOA>\n");
475  fprintf(out, "\n");
476  fprintf(out, "\t</Zone>\n");
477  fprintf(out, "</SignerConfiguration>\n");
478  }
479  return;
480 }
481 
482 
487 void
488 signconf_log(signconf_type* sc, const char* name)
489 {
490  char* resign = NULL;
491  char* refresh = NULL;
492  char* validity = NULL;
493  char* denial = NULL;
494  char* jitter = NULL;
495  char* offset = NULL;
496  char* dnskeyttl = NULL;
497  char* soattl = NULL;
498  char* soamin = NULL;
499  char* paramttl = NULL;
500 
501  if (sc) {
502  resign = duration2string(sc->sig_resign_interval);
503  refresh = duration2string(sc->sig_refresh_interval);
504  validity = duration2string(sc->sig_validity_default);
505  denial = duration2string(sc->sig_validity_denial);
506  jitter = duration2string(sc->sig_jitter);
508  dnskeyttl = duration2string(sc->dnskey_ttl);
509  paramttl = duration2string(sc->nsec3param_ttl);
510  soattl = duration2string(sc->soa_ttl);
511  soamin = duration2string(sc->soa_min);
512  /* signconf */
513  ods_log_info("[%s] zone %s signconf: RESIGN[%s] REFRESH[%s] "
514  "VALIDITY[%s] DENIAL[%s] JITTER[%s] OFFSET[%s] NSEC[%i] "
515  "DNSKEYTTL[%s] SOATTL[%s] MINIMUM[%s] SERIAL[%s]",
516  sc_str,
517  name?name:"(null)",
518  resign?resign:"(null)",
519  refresh?refresh:"(null)",
520  validity?validity:"(null)",
521  denial?denial:"(null)",
522  jitter?jitter:"(null)",
523  offset?offset:"(null)",
524  (int) sc->nsec_type,
525  dnskeyttl?dnskeyttl:"(null)",
526  soattl?soattl:"(null)",
527  soamin?soamin:"(null)",
528  sc->soa_serial?sc->soa_serial:"(null)");
529  /* nsec3 parameters */
530  if (sc->nsec_type == LDNS_RR_TYPE_NSEC3) {
531  ods_log_debug("[%s] zone %s nsec3: PARAMTTL[%s] OPTOUT[%i] "
532  "ALGORITHM[%u] ITERATIONS[%u] SALT[%s]",
533  sc_str,
534  name?name:"(null)",
535  paramttl?paramttl:"PT0S",
536  sc->nsec3_optout,
537  sc->nsec3_algo,
538  sc->nsec3_iterations,
539  sc->nsec3_salt?sc->nsec3_salt:"(null)");
540  }
541  /* keys */
542  keylist_log(sc->keys, name);
543  /* cleanup */
544  free((void*)resign);
545  free((void*)refresh);
546  free((void*)validity);
547  free((void*)denial);
548  free((void*)jitter);
549  free((void*)offset);
550  free((void*)dnskeyttl);
551  free((void*)paramttl);
552  free((void*)soattl);
553  free((void*)soamin);
554  }
555  return;
556 }
557 
558 
563 void
565 {
566  allocator_type* allocator = NULL;
567  if (!sc) {
568  return;
569  }
579  keylist_cleanup(sc->keys);
581  allocator = sc->allocator;
582  allocator_deallocate(allocator, (void*) sc->filename);
583  allocator_deallocate(allocator, (void*) sc->nsec3_salt);
584  allocator_deallocate(allocator, (void*) sc->soa_serial);
585  allocator_deallocate(allocator, (void*) sc);
586  allocator_cleanup(allocator);
587  return;
588 }
signconf_type * signconf_create(void)
Definition: signconf.c:47
void keylist_cleanup(keylist_type *kl)
Definition: keys.c:264
duration_type * parse_sc_sig_validity_default(const char *cfgfile)
Definition: task.h:41
uint32_t nsec3_iterations
Definition: signconf.h:66
duration_type * parse_sc_sig_validity_denial(const char *cfgfile)
duration_type * sig_inception_offset
Definition: signconf.h:60
task_id signconf_compare_denial(signconf_type *a, signconf_type *b)
Definition: signconf.c:363
uint32_t parse_sc_nsec3_algorithm(const char *cfgfile)
void signconf_backup(FILE *fd, signconf_type *sc, const char *version)
Definition: signconf.c:222
void keylist_log(keylist_type *kl, const char *name)
Definition: keys.c:229
void ods_log_debug(const char *format,...)
Definition: log.c:270
duration_type * soa_min
Definition: signconf.h:74
duration_type * parse_sc_soa_ttl(const char *cfgfile)
ods_status signconf_check(signconf_type *sc)
Definition: signconf.c:283
const char * nsec3_salt
Definition: signconf.h:67
const char * soa_serial
Definition: signconf.h:75
keylist_type * keys
Definition: signconf.h:71
duration_type * soa_ttl
Definition: signconf.h:73
void * allocator_alloc(allocator_type *allocator, size_t size)
Definition: allocator.c:66
duration_type * sig_validity_default
Definition: signconf.h:57
void signconf_cleanup(signconf_type *sc)
Definition: signconf.c:564
duration_type * sig_validity_denial
Definition: signconf.h:58
duration_type * nsec3param_ttl
Definition: signconf.h:62
void ods_log_info(const char *format,...)
Definition: log.c:302
enum ods_enum_status ods_status
Definition: status.h:90
const char * parse_sc_soa_serial(allocator_type *allocator, const char *cfgfile)
ods_status parse_file_check(const char *cfgfile, const char *rngfile)
Definition: confparser.c:53
time_t ods_file_lastmodified(const char *file)
Definition: file.c:293
void ods_log_error(const char *format,...)
Definition: log.c:334
duration_type * parse_sc_sig_inception_offset(const char *cfgfile)
const char * ods_status2str(ods_status status)
Definition: status.c:111
void keylist_print(FILE *fd, keylist_type *kl)
Definition: keys.c:211
int ods_strcmp(const char *s1, const char *s2)
Definition: file.c:320
void duration_cleanup(duration_type *duration)
Definition: duration.c:600
ldns_rr_type nsec_type
Definition: signconf.h:63
void signconf_print(FILE *out, signconf_type *sc, const char *name)
Definition: signconf.c:396
enum task_id_enum task_id
Definition: task.h:48
FILE * ods_fopen(const char *file, const char *dir, const char *mode)
Definition: file.c:190
const char * parse_sc_nsec3_salt(allocator_type *allocator, const char *cfgfile)
duration_type * parse_sc_dnskey_ttl(const char *cfgfile)
duration_type * parse_sc_sig_jitter(const char *cfgfile)
nsec3params_type * nsec3params_create(void *sc, uint8_t algo, uint8_t flags, uint16_t iter, const char *salt)
Definition: nsec3params.c:103
duration_type * sig_refresh_interval
Definition: signconf.h:56
allocator_type * allocator_create(void *(*allocator)(size_t size), void(*deallocator)(void *))
Definition: allocator.c:47
Definition: task.h:43
duration_type * parse_sc_nsec3param_ttl(const char *cfgfile)
char * allocator_strdup(allocator_type *allocator, const char *string)
Definition: allocator.c:121
char * duration2string(duration_type *duration)
Definition: duration.c:229
duration_type * parse_sc_sig_refresh_interval(const char *cfgfile)
int parse_sc_nsec3_optout(const char *cfgfile)
duration_type * parse_sc_soa_min(const char *cfgfile)
time_t last_modified
Definition: signconf.h:78
uint32_t nsec3_algo
Definition: signconf.h:65
int duration_compare(duration_type *d1, duration_type *d2)
Definition: duration.c:83
nsec3params_type * nsec3params
Definition: signconf.h:68
size_t count
Definition: keys.h:74
void ods_fclose(FILE *fd)
Definition: file.c:250
allocator_type * allocator
Definition: signconf.h:53
keylist_type * parse_sc_keys(void *sc, const char *cfgfile)
void allocator_cleanup(allocator_type *allocator)
Definition: allocator.c:151
duration_type * dnskey_ttl
Definition: signconf.h:70
void signconf_log(signconf_type *sc, const char *name)
Definition: signconf.c:488
duration_type * sig_jitter
Definition: signconf.h:59
duration_type * sig_resign_interval
Definition: signconf.h:55
ldns_rr_type parse_sc_nsec_type(const char *cfgfile)
void allocator_deallocate(allocator_type *allocator, void *data)
Definition: allocator.c:135
void nsec3params_cleanup(nsec3params_type *nsec3params)
Definition: nsec3params.c:208
#define ods_log_assert(x)
Definition: log.h:154
const char * filename
Definition: signconf.h:77
duration_type * parse_sc_sig_resign_interval(const char *cfgfile)
uint32_t parse_sc_nsec3_iterations(const char *cfgfile)
ods_status signconf_update(signconf_type **signconf, const char *scfile, time_t last_modified)
Definition: signconf.c:161
int nsec3_optout
Definition: signconf.h:64