nextpart ns2/named.run >/dev/null
rndccmd 10.53.0.2 reload dnskey-rrsigs-stripped | sed 's/^/ns2 /' | cat_i
wait_for_log 5 "zone dnskey-rrsigs-stripped/IN: loaded serial 2000042408" ns2/named.run || ret=1
-# make a query that flushes the unsigned DNSKEY RRset
-dig_with_opts +noauth a.dnskey-rrsigs-stripped. @10.53.0.4 a >dig.out.ns4.test$n || ret=1
-# make a second query that should now validate
dig_with_opts +noauth b.dnskey-rrsigs-stripped. @10.53.0.2 a >dig.out.ns2.test$n || ret=1
dig_with_opts +noauth b.dnskey-rrsigs-stripped. @10.53.0.4 a >dig.out.ns4.test$n || ret=1
digcomp dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
nextpart ns2/named.run >/dev/null
rndccmd 10.53.0.2 reload ds-rrsigs-stripped | sed 's/^/ns2 /' | cat_i
wait_for_log 5 "zone ds-rrsigs-stripped/IN: loaded serial 2000042408" ns2/named.run || ret=1
-# make a query that flushes the unsigned DS RRset
-dig_with_opts +noauth a.child.ds-rrsigs-stripped. @10.53.0.4 a >dig.out.ns4.test$n || ret=1
-# make a second query that should now validate
dig_with_opts +noauth b.child.ds-rrsigs-stripped. @10.53.0.2 a >dig.out.ns2.test$n || ret=1
dig_with_opts +noauth b.child.ds-rrsigs-stripped. @10.53.0.4 a >dig.out.ns4.test$n || ret=1
digcomp dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
dns_rdatatype_t type, const char *caller,
const char *operation);
+static isc_result_t
+create_fetch(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type,
+ isc_taskaction_t callback, const char *caller);
+
/*%
* Ensure the validator's rdatasets are marked as expired.
*/
dns_validator_t *val;
bool want_destroy;
isc_result_t result;
- isc_result_t eresult;
isc_result_t saved_result;
UNUSED(task);
devent = (dns_validatorevent_t *)event;
val = devent->ev_arg;
- eresult = devent->result;
+ result = devent->result;
isc_event_free(&event);
dns_validator_destroy(&val->subvalidator);
validator_log(val, ISC_LOG_DEBUG(3), "in validator_callback_dnskey");
LOCK(&val->lock);
if (CANCELED(val)) {
- validator_done(val, ISC_R_CANCELED);
- } else if (eresult == ISC_R_SUCCESS) {
+ result = ISC_R_CANCELED;
+ } else if (result == ISC_R_SUCCESS) {
validator_log(val, ISC_LOG_DEBUG(3), "keyset with trust %s",
dns_trust_totext(val->frdataset.trust));
/*
result = saved_result;
}
}
- if (result != DNS_R_WAIT) {
- validator_done(val, result);
- }
} else {
- if (eresult != DNS_R_BROKENCHAIN) {
- expire_rdatasets(val);
- }
validator_log(val, ISC_LOG_DEBUG(3),
"validator_callback_dnskey: got %s",
- isc_result_totext(eresult));
- validator_done(val, DNS_R_BROKENCHAIN);
+ isc_result_totext(result));
+ if (result != DNS_R_BROKENCHAIN) {
+ expire_rdatasets(val);
+ result = create_fetch(val, &val->siginfo->signer,
+ dns_rdatatype_dnskey,
+ fetch_callback_dnskey,
+ "validator_callback_dnskey");
+ if (result == ISC_R_SUCCESS) {
+ result = DNS_R_WAIT;
+ }
+ }
+ }
+ if (result != DNS_R_WAIT) {
+ validator_done(val, result);
}
want_destroy = exit_check(val);
dns_validator_t *val;
bool want_destroy;
isc_result_t result;
- isc_result_t eresult;
UNUSED(task);
INSIST(event->ev_type == DNS_EVENT_VALIDATORDONE);
devent = (dns_validatorevent_t *)event;
val = devent->ev_arg;
- eresult = devent->result;
+ result = devent->result;
isc_event_free(&event);
dns_validator_destroy(&val->subvalidator);
validator_log(val, ISC_LOG_DEBUG(3), "in validator_callback_ds");
LOCK(&val->lock);
if (CANCELED(val)) {
- validator_done(val, ISC_R_CANCELED);
- } else if (eresult == ISC_R_SUCCESS) {
+ result = ISC_R_CANCELED;
+ } else if (result == ISC_R_SUCCESS) {
bool have_dsset;
dns_name_t *name;
validator_log(val, ISC_LOG_DEBUG(3), "%s with trust %s",
} else {
result = validate_dnskey(val);
}
- if (result != DNS_R_WAIT) {
- validator_done(val, result);
- }
} else {
- if (eresult != DNS_R_BROKENCHAIN) {
- expire_rdatasets(val);
- }
validator_log(val, ISC_LOG_DEBUG(3),
"validator_callback_ds: got %s",
- isc_result_totext(eresult));
- validator_done(val, DNS_R_BROKENCHAIN);
+ isc_result_totext(result));
+ if (result != DNS_R_BROKENCHAIN) {
+ expire_rdatasets(val);
+ result = create_fetch(
+ val, val->event->name, dns_rdatatype_ds,
+ fetch_callback_ds, "validator_callback_ds");
+ if (result == ISC_R_SUCCESS) {
+ result = DNS_R_WAIT;
+ }
+ }
+ }
+ if (result != DNS_R_WAIT) {
+ validator_done(val, result);
}
want_destroy = exit_check(val);