mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
KASP timings all uint32_t
Get rid of the warnings in the Windows build.
This commit is contained in:
parent
9fbc869108
commit
29e6ec3181
@ -24,8 +24,6 @@
|
|||||||
* signed and maintained.
|
* signed and maintained.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
#include <isc/magic.h>
|
#include <isc/magic.h>
|
||||||
#include <isc/mutex.h>
|
#include <isc/mutex.h>
|
||||||
@ -46,7 +44,7 @@ struct dns_kasp_key {
|
|||||||
ISC_LINK(struct dns_kasp_key) link;
|
ISC_LINK(struct dns_kasp_key) link;
|
||||||
|
|
||||||
/* Configuration */
|
/* Configuration */
|
||||||
time_t lifetime;
|
uint32_t lifetime;
|
||||||
uint32_t algorithm;
|
uint32_t algorithm;
|
||||||
int length;
|
int length;
|
||||||
uint8_t role;
|
uint8_t role;
|
||||||
@ -75,7 +73,7 @@ struct dns_kasp {
|
|||||||
|
|
||||||
/* Configuration: Keys */
|
/* Configuration: Keys */
|
||||||
dns_kasp_keylist_t keys;
|
dns_kasp_keylist_t keys;
|
||||||
uint32_t dnskey_ttl;
|
dns_ttl_t dnskey_ttl;
|
||||||
|
|
||||||
/* Configuration: Timings */
|
/* Configuration: Timings */
|
||||||
uint32_t publish_safety;
|
uint32_t publish_safety;
|
||||||
@ -83,12 +81,12 @@ struct dns_kasp {
|
|||||||
|
|
||||||
/* Zone settings */
|
/* Zone settings */
|
||||||
dns_ttl_t zone_max_ttl;
|
dns_ttl_t zone_max_ttl;
|
||||||
time_t zone_propagation_delay;
|
uint32_t zone_propagation_delay;
|
||||||
|
|
||||||
/* Parent settings */
|
/* Parent settings */
|
||||||
dns_ttl_t parent_ds_ttl;
|
dns_ttl_t parent_ds_ttl;
|
||||||
time_t parent_propagation_delay;
|
uint32_t parent_propagation_delay;
|
||||||
time_t parent_registration_delay;
|
uint32_t parent_registration_delay;
|
||||||
|
|
||||||
// TODO: The rest of the KASP configuration
|
// TODO: The rest of the KASP configuration
|
||||||
};
|
};
|
||||||
@ -208,7 +206,7 @@ dns_kasp_getname(dns_kasp_t *kasp);
|
|||||||
*\li name of 'kasp'.
|
*\li name of 'kasp'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_signdelay(dns_kasp_t *kasp);
|
dns_kasp_signdelay(dns_kasp_t *kasp);
|
||||||
/*%<
|
/*%<
|
||||||
* Get the delay that is needed to ensure that all existing RRsets have been
|
* Get the delay that is needed to ensure that all existing RRsets have been
|
||||||
@ -225,7 +223,7 @@ dns_kasp_signdelay(dns_kasp_t *kasp);
|
|||||||
*\li signature refresh interval.
|
*\li signature refresh interval.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_sigrefresh(dns_kasp_t *kasp);
|
dns_kasp_sigrefresh(dns_kasp_t *kasp);
|
||||||
/*%<
|
/*%<
|
||||||
* Get signature refresh interval.
|
* Get signature refresh interval.
|
||||||
@ -239,9 +237,9 @@ dns_kasp_sigrefresh(dns_kasp_t *kasp);
|
|||||||
*\li signature refresh interval.
|
*\li signature refresh interval.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_sigvalidity(dns_kasp_t *kasp);
|
dns_kasp_sigvalidity(dns_kasp_t *kasp);
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_sigvalidity_dnskey(dns_kasp_t *kasp);
|
dns_kasp_sigvalidity_dnskey(dns_kasp_t *kasp);
|
||||||
/*%<
|
/*%<
|
||||||
* Get signature validity.
|
* Get signature validity.
|
||||||
@ -269,7 +267,7 @@ dns_kasp_dnskeyttl(dns_kasp_t *kasp);
|
|||||||
*\li DNSKEY TTL.
|
*\li DNSKEY TTL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_publishsafety(dns_kasp_t *kasp);
|
dns_kasp_publishsafety(dns_kasp_t *kasp);
|
||||||
/*%<
|
/*%<
|
||||||
* Get publish safety interval.
|
* Get publish safety interval.
|
||||||
@ -283,7 +281,7 @@ dns_kasp_publishsafety(dns_kasp_t *kasp);
|
|||||||
*\li Publish safety interval.
|
*\li Publish safety interval.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_retiresafety(dns_kasp_t *kasp);
|
dns_kasp_retiresafety(dns_kasp_t *kasp);
|
||||||
/*%<
|
/*%<
|
||||||
* Get retire safety interval.
|
* Get retire safety interval.
|
||||||
@ -311,7 +309,7 @@ dns_kasp_zonemaxttl(dns_kasp_t *kasp);
|
|||||||
*\li Maximum zone TTL.
|
*\li Maximum zone TTL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_zonepropagationdelay(dns_kasp_t *kasp);
|
dns_kasp_zonepropagationdelay(dns_kasp_t *kasp);
|
||||||
/*%<
|
/*%<
|
||||||
* Get zone propagation delay.
|
* Get zone propagation delay.
|
||||||
@ -339,7 +337,7 @@ dns_kasp_dsttl(dns_kasp_t *kasp);
|
|||||||
*\li Expected parent DS TTL.
|
*\li Expected parent DS TTL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_parentpropagationdelay(dns_kasp_t *kasp);
|
dns_kasp_parentpropagationdelay(dns_kasp_t *kasp);
|
||||||
/*%<
|
/*%<
|
||||||
* Get parent zone propagation delay.
|
* Get parent zone propagation delay.
|
||||||
@ -353,7 +351,7 @@ dns_kasp_parentpropagationdelay(dns_kasp_t *kasp);
|
|||||||
*\li Parent zone propagation delay.
|
*\li Parent zone propagation delay.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_parentregistrationdelay(dns_kasp_t *kasp);
|
dns_kasp_parentregistrationdelay(dns_kasp_t *kasp);
|
||||||
/*%<
|
/*%<
|
||||||
* Get parent registration delay for submitting new DS.
|
* Get parent registration delay for submitting new DS.
|
||||||
@ -441,7 +439,7 @@ dns_kasp_key_size(dns_kasp_key_t *key);
|
|||||||
* configured.
|
* configured.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_key_lifetime(dns_kasp_key_t *key);
|
dns_kasp_key_lifetime(dns_kasp_key_t *key);
|
||||||
/*%<
|
/*%<
|
||||||
* The lifetime of this key (how long may this key be active?)
|
* The lifetime of this key (how long may this key be active?)
|
||||||
|
@ -124,28 +124,28 @@ dns_kasp_thaw(dns_kasp_t *kasp) {
|
|||||||
kasp->frozen = false;
|
kasp->frozen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_signdelay(dns_kasp_t *kasp) {
|
dns_kasp_signdelay(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
return (kasp->signatures_validity - kasp->signatures_refresh);
|
return (kasp->signatures_validity - kasp->signatures_refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_sigrefresh(dns_kasp_t *kasp) {
|
dns_kasp_sigrefresh(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
return kasp->signatures_refresh;
|
return kasp->signatures_refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_sigvalidity(dns_kasp_t *kasp) {
|
dns_kasp_sigvalidity(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
return kasp->signatures_validity;
|
return kasp->signatures_validity;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_sigvalidity_dnskey(dns_kasp_t *kasp) {
|
dns_kasp_sigvalidity_dnskey(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
@ -159,14 +159,14 @@ dns_kasp_dnskeyttl(dns_kasp_t *kasp) {
|
|||||||
return kasp->dnskey_ttl;
|
return kasp->dnskey_ttl;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_publishsafety(dns_kasp_t *kasp) {
|
dns_kasp_publishsafety(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
return kasp->publish_safety;
|
return kasp->publish_safety;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_retiresafety(dns_kasp_t *kasp) {
|
dns_kasp_retiresafety(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
@ -180,7 +180,7 @@ dns_kasp_zonemaxttl(dns_kasp_t *kasp) {
|
|||||||
return kasp->zone_max_ttl;
|
return kasp->zone_max_ttl;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_zonepropagationdelay(dns_kasp_t *kasp) {
|
dns_kasp_zonepropagationdelay(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
@ -194,14 +194,14 @@ dns_kasp_dsttl(dns_kasp_t *kasp) {
|
|||||||
return kasp->parent_ds_ttl;
|
return kasp->parent_ds_ttl;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_parentpropagationdelay(dns_kasp_t *kasp) {
|
dns_kasp_parentpropagationdelay(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
return kasp->parent_propagation_delay;
|
return kasp->parent_propagation_delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_parentregistrationdelay(dns_kasp_t *kasp) {
|
dns_kasp_parentregistrationdelay(dns_kasp_t *kasp) {
|
||||||
REQUIRE(DNS_KASP_VALID(kasp));
|
REQUIRE(DNS_KASP_VALID(kasp));
|
||||||
REQUIRE(kasp->frozen);
|
REQUIRE(kasp->frozen);
|
||||||
@ -313,7 +313,7 @@ dns_kasp_key_size(dns_kasp_key_t *key) {
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
uint32_t
|
||||||
dns_kasp_key_lifetime(dns_kasp_key_t *key) {
|
dns_kasp_key_lifetime(dns_kasp_key_t *key) {
|
||||||
|
|
||||||
REQUIRE(key != NULL);
|
REQUIRE(key != NULL);
|
||||||
|
@ -46,8 +46,8 @@ confget(cfg_obj_t const * const *maps, const char *name, const cfg_obj_t **obj)
|
|||||||
/*
|
/*
|
||||||
* Utility function for configuring durations.
|
* Utility function for configuring durations.
|
||||||
*/
|
*/
|
||||||
static time_t
|
static uint32_t
|
||||||
get_duration(const cfg_obj_t **maps, const char* option, time_t dfl)
|
get_duration(const cfg_obj_t **maps, const char* option, uint32_t dfl)
|
||||||
{
|
{
|
||||||
const cfg_obj_t *obj;
|
const cfg_obj_t *obj;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
@ -984,8 +984,8 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_uint64 = {
|
|||||||
* Get the number of digits in a number.
|
* Get the number of digits in a number.
|
||||||
*/
|
*/
|
||||||
static size_t
|
static size_t
|
||||||
numlen(time_t num) {
|
numlen(uint32_t num) {
|
||||||
uint32_t period = (uint32_t) num;
|
uint32_t period = num;
|
||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
|
|
||||||
if (period == 0) {
|
if (period == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user