|
@@ -1369,6 +1369,21 @@ TEST_F(QueryTest, wildcardNxrrsetWithNSEC3) {
|
|
|
NULL, mock_finder->getOrigin());
|
|
|
}
|
|
|
|
|
|
+TEST_F(QueryTest, wildcardNxrrsetWithNSEC3Collision) {
|
|
|
+ // Similar to the previous case, but emulating run time collision by
|
|
|
+ // returning NULL in the next closer proof for the closest encloser
|
|
|
+ // proof.
|
|
|
+ mock_finder->setNSEC3Flag(true);
|
|
|
+ ZoneFinder::FindNSEC3Result nsec3(true, 0, textToRRset(nsec3_apex_txt),
|
|
|
+ ConstRRsetPtr());
|
|
|
+ mock_finder->setNSEC3Result(&nsec3);
|
|
|
+
|
|
|
+ // Message::addRRset() will detect it and throw InvalidParameter.
|
|
|
+ EXPECT_THROW(Query(memory_client, Name("www1.uwild.example.com"),
|
|
|
+ RRType::TXT(), response, true).process(),
|
|
|
+ isc::InvalidParameter);
|
|
|
+}
|
|
|
+
|
|
|
TEST_F(QueryTest, wildcardEmptyWithNSEC) {
|
|
|
// Empty WILDCARD with DNSSEC proof. We should have SOA, NSEC that proves
|
|
|
// the NXDOMAIN and their RRSIGs. In this case we need two NSEC RRs,
|