supported_algorithm = ISC_FALSE;
/*
- * If DNS_DSDIGEST_SHA256 is present we are required to prefer
- * it over DNS_DSDIGEST_SHA1. This in practice means that we
- * need to ignore DNS_DSDIGEST_SHA1 if a DNS_DSDIGEST_SHA256
- * is present.
+ * If DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384 is present we
+ * are required to prefer it over DNS_DSDIGEST_SHA1. This in
+ * practice means that we need to ignore DNS_DSDIGEST_SHA1 if a
+ * DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384 is present.
*/
memset(digest_types, 1, sizeof(digest_types));
for (result = dns_rdataset_first(&val->dlv);
result = dns_rdata_tostruct(&dlvrdata, &dlv, NULL);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
+ if (!dns_resolver_ds_digest_supported(val->view->resolver,
+ val->event->name,
+ dlv.digest_type))
+ continue;
+
if (!dns_resolver_algorithm_supported(val->view->resolver,
val->event->name,
dlv.algorithm))
continue;
- if (dlv.digest_type == DNS_DSDIGEST_SHA256 &&
- dlv.length == ISC_SHA256_DIGESTLENGTH) {
+ if ((dlv.digest_type == DNS_DSDIGEST_SHA256 &&
+ dlv.length == ISC_SHA256_DIGESTLENGTH) ||
+ (dlv.digest_type == DNS_DSDIGEST_SHA384 &&
+ dlv.length == ISC_SHA384_DIGESTLENGTH))
+ {
digest_types[DNS_DSDIGEST_SHA1] = 0;
break;
}
supported_algorithm = ISC_FALSE;
/*
- * If DNS_DSDIGEST_SHA256 is present we are required to prefer
- * it over DNS_DSDIGEST_SHA1. This in practice means that we
- * need to ignore DNS_DSDIGEST_SHA1 if a DNS_DSDIGEST_SHA256
- * is present.
+ * If DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384 is present we
+ * are required to prefer it over DNS_DSDIGEST_SHA1. This in
+ * practice means that we need to ignore DNS_DSDIGEST_SHA1 if a
+ * DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384 is present.
*/
memset(digest_types, 1, sizeof(digest_types));
for (result = dns_rdataset_first(val->dsset);
result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
+ if (!dns_resolver_ds_digest_supported(val->view->resolver,
+ val->event->name,
+ ds.digest_type))
+ continue;
+
if (!dns_resolver_algorithm_supported(val->view->resolver,
val->event->name,
ds.algorithm))
continue;
- if (ds.digest_type == DNS_DSDIGEST_SHA256 &&
- ds.length == ISC_SHA256_DIGESTLENGTH) {
+ if ((ds.digest_type == DNS_DSDIGEST_SHA256 &&
+ ds.length == ISC_SHA256_DIGESTLENGTH) ||
+ (ds.digest_type == DNS_DSDIGEST_SHA384 &&
+ ds.length == ISC_SHA384_DIGESTLENGTH))
+ {
digest_types[DNS_DSDIGEST_SHA1] = 0;
break;
}