OpenDNSSEC-signer
1.3.8
|
00001 /* 00002 * $Id: signconf.h 4550 2011-03-11 11:42:01Z matthijs $ 00003 * 00004 * Copyright (c) 2009 NLNet Labs. All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 1. Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 2. Redistributions in binary form must reproduce the above copyright 00012 * notice, this list of conditions and the following disclaimer in the 00013 * documentation and/or other materials provided with the distribution. 00014 * 00015 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00016 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00017 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00018 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 00019 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00020 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00021 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00022 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00023 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00024 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 00025 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 * 00027 */ 00028 00034 #ifndef SIGNER_SIGNCONF_H 00035 #define SIGNER_SIGNCONF_H 00036 00037 #include "scheduler/task.h" 00038 #include "shared/allocator.h" 00039 #include "shared/duration.h" 00040 #include "signer/keys.h" 00041 00042 #include <ldns/ldns.h> 00043 #include <time.h> 00044 00045 00050 typedef struct signconf_struct signconf_type; 00051 struct signconf_struct { 00052 /* Zone */ 00053 const char* name; 00054 allocator_type* allocator; 00055 /* Signatures */ 00056 duration_type* sig_resign_interval; 00057 duration_type* sig_refresh_interval; 00058 duration_type* sig_validity_default; 00059 duration_type* sig_validity_denial; 00060 duration_type* sig_jitter; 00061 duration_type* sig_inception_offset; 00062 /* Denial of existence */ 00063 ldns_rr_type nsec_type; 00064 int nsec3_optout; 00065 uint32_t nsec3_algo; 00066 uint32_t nsec3_iterations; 00067 const char* nsec3_salt; 00068 /* Keys */ 00069 duration_type* dnskey_ttl; 00070 keylist_type* keys; 00071 /* Source of authority */ 00072 duration_type* soa_ttl; 00073 duration_type* soa_min; 00074 const char* soa_serial; 00075 /* Other useful information */ 00076 const char* filename; 00077 time_t last_modified; 00078 int audit; 00079 }; 00080 00086 signconf_type* signconf_create(void); 00087 00096 ods_status signconf_update(signconf_type** signconf, const char* scfile, 00097 time_t last_modified); 00098 00105 signconf_type* signconf_recover_from_backup(const char* filename); 00106 00113 void signconf_backup(FILE* fd, signconf_type* sc); 00114 00121 ods_status signconf_check(signconf_type* signconf); 00122 00130 task_id signconf_compare_denial(signconf_type* a, signconf_type* b); 00131 00140 task_id signconf_compare_keys(signconf_type* a, signconf_type* b, 00141 ldns_rr_list* del); 00142 00150 task_id signconf_compare(signconf_type* a, signconf_type* b); 00151 00157 void signconf_cleanup(signconf_type* sc); 00158 00166 void signconf_print(FILE* out, signconf_type* sc, const char* name); 00167 00174 void signconf_log(signconf_type* sc, const char* name); 00175 00176 #endif /* SIGNER_SIGNCONF_H */