}
}
- if (type == dns_rdatatype_dnskey ||
- type == dns_rdatatype_cdnskey ||
- type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(type)) {
/*
* DNSKEY RRset is signed with KSK.
* CDS and CDNSKEY RRsets too (RFC 7344, 4.1).
/*
* CDS and CDNSKEY are signed with KSK (RFC 7344, 4.1).
*/
- if (type == dns_rdatatype_dnskey ||
- type == dns_rdatatype_cdnskey ||
- type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(type)) {
if (!KSK(keys[i]) && keyset_kskonly) {
continue;
}
&flag));
if (flag) {
isc_stdtime_t exp;
- if (type == dns_rdatatype_dnskey ||
- type == dns_rdatatype_cdnskey ||
- type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(type)) {
exp = state->keyexpire;
} else if (type == dns_rdatatype_soa) {
exp = state->soaexpire;
result = dns_rdata_tostruct(&rdata, &rrsig, NULL);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
- if (type != dns_rdatatype_dnskey && type != dns_rdatatype_cds &&
- type != dns_rdatatype_cdnskey)
- {
+ if (!dns_rdatatype_iskeymaterial(type)) {
bool warn = false, deleted = false;
if (delsig_ok(&rrsig, keys, nkeys, kasp, &warn)) {
result = update_one_rr(db, ver, zonediff->diff,
both = have_ksk && have_zsk;
}
- if (type == dns_rdatatype_dnskey ||
- type == dns_rdatatype_cdnskey ||
- type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(type)) {
/*
* DNSKEY RRset is signed with KSK.
* CDS and CDNSKEY RRsets too (RFC 7344, 4.1).
/*
* CDS and CDNSKEY are signed with KSK (RFC 7344, 4.1).
*/
- if (type == dns_rdatatype_dnskey ||
- type == dns_rdatatype_cdnskey ||
- type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(type)) {
if (!KSK(keys[i]) && keyset_kskonly) {
continue;
}
}
KASP_UNLOCK(kasp);
- if (type == dns_rdatatype_dnskey ||
- type == dns_rdatatype_cdnskey || type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(type)) {
/*
* CDS and CDNSKEY are signed with KSK like DNSKEY.
* (RFC 7344, section 4.1 specifies that they must
{
goto next_rdataset;
}
- if (rdataset.type == dns_rdatatype_dnskey ||
- rdataset.type == dns_rdatatype_cdnskey ||
- rdataset.type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(rdataset.type)) {
/*
* CDS and CDNSKEY are signed with KSK like DNSKEY.
* (RFC 7344, section 4.1 specifies that they must
isc_stdtime_t exp = expire;
if (keyexpire != 0 &&
- (tuple->rdata.type == dns_rdatatype_dnskey ||
- tuple->rdata.type == dns_rdatatype_cdnskey ||
- tuple->rdata.type == dns_rdatatype_cds))
+ dns_rdatatype_iskeymaterial(tuple->rdata.type))
{
exp = keyexpire;
}
* update the zone with these records from a different provider,
* but skip records that are under our control.
*/
- if (rdata->type == dns_rdatatype_dnskey ||
- rdata->type == dns_rdatatype_cdnskey ||
- rdata->type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(rdata->type)) {
bool inuse = false;
isc_result_t r = dns_zone_dnskey_inuse(zone, rdata,
&inuse);
* update the zone with these records from a different provider,
* but skip records that are under our control.
*/
- if (tuple->rdata.type == dns_rdatatype_dnskey ||
- tuple->rdata.type == dns_rdatatype_cdnskey ||
- tuple->rdata.type == dns_rdatatype_cds)
- {
+ if (dns_rdatatype_iskeymaterial(tuple->rdata.type)) {
bool inuse = false;
isc_result_t r = dns_zone_dnskey_inuse(
seczone, &tuple->rdata, &inuse);