summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog3
-rw-r--r--dnssec.c2
-rw-r--r--drill/drill.c8
-rw-r--r--drill/drill_util.c8
-rw-r--r--examples/ldns-keyfetcher.c3
-rw-r--r--host2str.c12
6 files changed, 20 insertions, 16 deletions
diff --git a/Changelog b/Changelog
index 9d614ee6..0a8d265c 100644
--- a/Changelog
+++ b/Changelog
@@ -8,6 +8,9 @@
* Added more memory allocation checks in host2str.c
* python wrapper for ldns_fetch_valid_domain_keys by Bedrich Kosata.
* fix to compile python wrapper with swig 2.0.2.
+ * Don't fallback to SHA-1 when creating NSEC3 hash with another
+ algorithm identifier, fail instead (no other algorithm identifiers
+ are assigned yet).
1.6.8 2011-01-24
* Fix ldns zone, so that $TTL definition match RFC 2308.
diff --git a/dnssec.c b/dnssec.c
index f384ce05..ce02ef36 100644
--- a/dnssec.c
+++ b/dnssec.c
@@ -975,7 +975,7 @@ ldns_nsec3_hash_name(ldns_rdf *name,
/* TODO: mnemonic list for hash algs SHA-1, default to 1 now (sha1) */
if (algorithm != LDNS_SHA1) {
return NULL;
- }
+ }
/* prepare the owner name according to the draft section bla */
cann = ldns_rdf_clone(name);
diff --git a/drill/drill.c b/drill/drill.c
index bae04db8..abd0ff63 100644
--- a/drill/drill.c
+++ b/drill/drill.c
@@ -866,8 +866,8 @@ main(int argc, char *argv[])
for(key_count = 0; key_count < ldns_rr_list_rr_count(key_verified);
key_count++) {
if (verbosity != -1) {
- printf("; VALIDATED by id = %d, owner = ",
- (int)ldns_calc_keytag(
+ printf("; VALIDATED by id = %u, owner = ",
+ (unsigned int)ldns_calc_keytag(
ldns_rr_list_rr(key_verified, key_count)));
ldns_rdf_print(stdout, ldns_rr_owner(
ldns_rr_list_rr(key_list, key_count)));
@@ -878,9 +878,9 @@ main(int argc, char *argv[])
for(key_count = 0; key_count < ldns_rr_list_rr_count(key_list);
key_count++) {
if (verbosity != -1) {
- printf("; %s for id = %d, owner = ",
+ printf("; %s for id = %u, owner = ",
ldns_get_errorstr_by_id(result),
- (int)ldns_calc_keytag(
+ (unsigned int)ldns_calc_keytag(
ldns_rr_list_rr(key_list, key_count)));
ldns_rdf_print(stdout, ldns_rr_owner(
diff --git a/drill/drill_util.c b/drill/drill_util.c
index ae4ff65d..596be9d5 100644
--- a/drill/drill_util.c
+++ b/drill/drill_util.c
@@ -125,7 +125,7 @@ print_ds_of_keys(ldns_pkt *p)
if (keys) {
for (i = 0; i < ldns_rr_list_rr_count(keys); i++) {
fprintf(stdout, ";\n; equivalent DS records for key %u:\n",
- (unsigned)ldns_calc_keytag(ldns_rr_list_rr(keys, i)));
+ (unsigned int)ldns_calc_keytag(ldns_rr_list_rr(keys, i)));
ds = ldns_key_rr2ds(ldns_rr_list_rr(keys, i), LDNS_SHA1);
local_print_ds(stdout, "; sha1: ", ds);
@@ -226,16 +226,16 @@ print_dnskey_abbr(FILE *fp, ldns_rr *key)
ldns_rdf_print(fp, ldns_rr_rdf(key, 2));
if (ldns_rdf2native_int16(ldns_rr_rdf(key, 0)) == 256) {
- fprintf(fp, " ;{id = %d (zsk), size = %db}", (int)ldns_calc_keytag(key),
+ fprintf(fp, " ;{id = %u (zsk), size = %db}", (unsigned int)ldns_calc_keytag(key),
(int)ldns_rr_dnskey_key_size(key));
return;
}
if (ldns_rdf2native_int16(ldns_rr_rdf(key, 0)) == 257) {
- fprintf(fp, " ;{id = %d (ksk), size = %db}", (int)ldns_calc_keytag(key),
+ fprintf(fp, " ;{id = %u (ksk), size = %db}", (unsigned int)ldns_calc_keytag(key),
(int)ldns_rr_dnskey_key_size(key));
return;
}
- fprintf(fp, " ;{id = %d, size = %db}", (int)ldns_calc_keytag(key),
+ fprintf(fp, " ;{id = %u, size = %db}", (unsigned int)ldns_calc_keytag(key),
(int)ldns_rr_dnskey_key_size(key));
}
diff --git a/examples/ldns-keyfetcher.c b/examples/ldns-keyfetcher.c
index b016a07b..c24f5111 100644
--- a/examples/ldns-keyfetcher.c
+++ b/examples/ldns-keyfetcher.c
@@ -687,7 +687,8 @@ main(int argc, char *argv[])
outputfile_buffer = ldns_buffer_new(300);
domain_str = ldns_rdf2str(ldns_rr_owner(k));
- ldns_buffer_printf(outputfile_buffer, "K%s+%03u+%05u.key", domain_str, ldns_rdf2native_int8(ldns_rr_rdf(k, 2)), ldns_calc_keytag(k));
+ ldns_buffer_printf(outputfile_buffer, "K%s+%03u+%05u.key", domain_str, ldns_rdf2native_int8(ldns_rr_rdf(k, 2)),
+ (unsigned int) ldns_calc_keytag(k));
outputfile_str = ldns_buffer_export(outputfile_buffer);
if (verbosity >= 1) {
diff --git a/host2str.c b/host2str.c
index f1cedc6f..75e3547a 100644
--- a/host2str.c
+++ b/host2str.c
@@ -1196,20 +1196,20 @@ ldns_rr2buffer_str(ldns_buffer *output, const ldns_rr *rr)
flags = ldns_rdf2native_int16(ldns_rr_rdf(rr, 0));
if (flags == 256 || flags == 384) {
ldns_buffer_printf(output,
- " ;{id = %d (zsk), size = %db}",
- ldns_calc_keytag(rr),
+ " ;{id = %u (zsk), size = %db}",
+ (unsigned int) ldns_calc_keytag(rr),
ldns_rr_dnskey_key_size(rr));
break;
}
if (flags == 257 || flags == 385) {
ldns_buffer_printf(output,
- " ;{id = %d (ksk), size = %db}",
- ldns_calc_keytag(rr),
+ " ;{id = %u (ksk), size = %db}",
+ (unsigned int) ldns_calc_keytag(rr),
ldns_rr_dnskey_key_size(rr));
break;
}
- ldns_buffer_printf(output, " ;{id = %d, size = %db}",
- ldns_calc_keytag(rr),
+ ldns_buffer_printf(output, " ;{id = %u, size = %db}",
+ (unsigned int) ldns_calc_keytag(rr),
ldns_rr_dnskey_key_size(rr));
}
break;