Commit 38c8e9a9 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[1176] Test it asks for DNSSEC data

While backends are allowed to pass DNSSEC data when not asked to, they
don't have to, so we need to ask for it. Test backend therefore doesn't
return the DNSSEC data when not asked to, to check it really asks.
parent ddf9da51
......@@ -215,8 +215,25 @@ MockZoneFinder::find(const Name& name, const RRType& type,
RRsetStore::const_iterator found_rrset =
if (found_rrset != found_domain->second.end()) {
// TODO: Drop whatever rrsig is there if options doesn't have the dnssec
return (FindResult(SUCCESS, found_rrset->second));
ConstRRsetPtr rrset;
// Strip whatever signature there is in case DNSSEC is not required
// Just to make sure the Query asks for it when it is needed
if (options & ZoneFinder::FIND_DNSSEC ||
!found_rrset->second->getRRsig()) {
rrset = found_rrset->second;
} else {
RRsetPtr noconst(new RRset(found_rrset->second->getName(),
for (RdataIteratorPtr
!i->isLast(); i->next()) {
rrset = noconst;
return (FindResult(SUCCESS, rrset));
// If not found but we have a target, fill it with all RRsets here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment