/* bad sig, expiration before inception?? Tsssg */
return LDNS_STATUS_CRYPTO_EXPIRATION_BEFORE_INCEPTION;
}
- if (now - inception < 0) {
+ if (((int32_t) now) - inception < 0) {
/* bad sig, inception date has not yet come to pass */
return LDNS_STATUS_CRYPTO_SIG_NOT_INCEPTED;
}
- if (expiration - now < 0) {
+ if (expiration - ((int32_t) now) < 0) {
/* bad sig, expiration date has passed */
return LDNS_STATUS_CRYPTO_SIG_EXPIRED;
}
number is smaller than the original one, the original one is simply
increased by one.
-When updating a zone's serial serial number, it will be stripped from DNSSEC
-data as well.
+When updating a serial number, records of type NSEC, NSEC3, RRSIG and DNSKEY
+will be skipped when printing the zone.
.TP
const ldns_status parent_status);
/**
- * Generates a dnssec_trust_ttree for the given rr from the
+ * Generates a dnssec_trust_tree for the given rr from the
* given data_chain
*
* This does not clone the actual data; Don't free the
ldns_rr *rr);
/**
- * Generates a dnssec_trust_ttree for the given rr from the
+ * Generates a dnssec_trust_tree for the given rr from the
* given data_chain
*
* This does not clone the actual data; Don't free the
/**
* Function to be used with dns_rr_soa_increment_func_int, to set the soa
* serial number.
- * \param[in] _ the (unused) current serial number.
+ * \param[in] unused the (unused) current serial number.
* \param[in] data the serial number to be set.
*/
-uint32_t ldns_soa_serial_identity(uint32_t _, void *data);
+uint32_t ldns_soa_serial_identity(uint32_t unused, void *data);
/**
* Function to be used with dns_rr_soa_increment_func, to increment the soa
* serial number with one.
* \param[in] s the current serial number.
- * \param[in] _ unused.
+ * \param[in] unused unused.
*/
-uint32_t ldns_soa_serial_increment(uint32_t s, void *_);
+uint32_t ldns_soa_serial_increment(uint32_t s, void *unused);
/**
* Function to be used with dns_rr_soa_increment_func_int, to increment the soa
);
}
-uint32_t ldns_soa_serial_identity(uint32_t ATTR_UNUSED(_), void *data)
+uint32_t ldns_soa_serial_identity(uint32_t ATTR_UNUSED(unused), void *data)
{
return (uint32_t) (intptr_t) data;
}
-uint32_t ldns_soa_serial_increment(uint32_t s, void *ATTR_UNUSED(_))
+uint32_t ldns_soa_serial_increment(uint32_t s, void *ATTR_UNUSED(unused))
{
return ldns_soa_serial_increment_by(s, (void *)1);
}
{
struct tm tm;
char s_str[11];
- uint32_t new_s;
+ int32_t new_s;
time_t t = data ? (time_t) (intptr_t) data : ldns_time(NULL);
(void) strftime(s_str, 11, "%Y%m%d00", localtime_r(&t, &tm));
- new_s = (uint32_t) atoi(s_str);
- return new_s > s ? new_s : s+1;
+ new_s = (int32_t) atoi(s_str);
+ return new_s - ((int32_t) s) < 0 ? s+1 : ((uint32_t) new_s);
}
uint32_t ldns_soa_serial_unixtime(uint32_t s, void *data)
{
- uint32_t new_s = data ? (uint32_t) (intptr_t) data
- : (uint32_t) ldns_time(NULL);
- return new_s > s ? new_s : s+1;
+ int32_t new_s = data ? (int32_t) (intptr_t) data
+ : (int32_t) ldns_time(NULL);
+ return new_s - ((int32_t) s) < 0 ? s+1 : ((uint32_t) new_s);
}
void