|
@@ -314,27 +314,6 @@ textToRRset(const string& text_rrset, const Name& origin = Name::ROOT_NAME()) {
|
|
|
return (rrset);
|
|
|
}
|
|
|
|
|
|
-ConstRRsetPtr
|
|
|
-prepareRRset(ConstRRsetPtr rr, const ZoneFinder::FindOptions options) {
|
|
|
- ConstRRsetPtr sig_rrset = rr->getRRsig();
|
|
|
- if (sig_rrset &&
|
|
|
- ((options & ZoneFinder::FIND_DNSSEC) == 0)) {
|
|
|
- RRsetPtr result_base(new RRset(rr->getName(),
|
|
|
- rr->getClass(),
|
|
|
- rr->getType(),
|
|
|
- rr->getTTL()));
|
|
|
- for (RdataIteratorPtr i(rr->getRdataIterator());
|
|
|
- !i->isLast();
|
|
|
- i->next()) {
|
|
|
- result_base->addRdata(i->getCurrent());
|
|
|
- }
|
|
|
-
|
|
|
- return(result_base);
|
|
|
- } else {
|
|
|
- return(rr);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
// This is a mock Zone Finder class for testing.
|
|
|
// It is a derived class of ZoneFinder for the convenient of tests.
|
|
|
// Its find() method emulates the common behavior of protocol compliant
|
|
@@ -506,7 +485,7 @@ protected:
|
|
|
isc::dns::ConstRRsetPtr rrset,
|
|
|
FindResultFlags flags = RESULT_DEFAULT)
|
|
|
{
|
|
|
- ConstRRsetPtr rr = (rrset ? prepareRRset(rrset, options) : rrset);
|
|
|
+ ConstRRsetPtr rr = (rrset ? stripRRsigs(rrset, options) : rrset);
|
|
|
return (ZoneFinderContextPtr(
|
|
|
new Context(*this, options,
|
|
|
ResultContext(code, rr, flags))));
|
|
@@ -622,7 +601,7 @@ MockZoneFinder::findAll(const Name& name, std::vector<ConstRRsetPtr>& target,
|
|
|
found_domain->second.begin();
|
|
|
found_rrset != found_domain->second.end(); ++found_rrset) {
|
|
|
// Insert RRs under the domain name into target
|
|
|
- target.push_back(prepareRRset(found_rrset->second, options));
|
|
|
+ target.push_back(stripRRsigs(found_rrset->second, options));
|
|
|
}
|
|
|
return (ZoneFinderContextPtr(
|
|
|
new Context(*this, options,
|