Browse Source

[2165] Don't add another copy of RRSIGs to the actual rrsets

Mukund Sivaraman 12 years ago
parent
commit
4ecd5fbc08

+ 1 - 8
src/lib/datasrc/tests/faked_nsec3.cc

@@ -93,8 +93,7 @@ void
 findNSEC3Check(bool expected_matched, uint8_t expected_labels,
                const string& expected_closest,
                const string& expected_next,
-               const ZoneFinder::FindNSEC3Result& result,
-               bool expected_sig)
+               const ZoneFinder::FindNSEC3Result& result)
 {
     EXPECT_EQ(expected_matched, result.matched);
     // Convert to int so the error messages would be more readable:
@@ -104,9 +103,6 @@ findNSEC3Check(bool expected_matched, uint8_t expected_labels,
     vector<ConstRRsetPtr> actual_rrsets;
     ASSERT_TRUE(result.closest_proof);
     actual_rrsets.push_back(result.closest_proof);
-    if (expected_sig) {
-        actual_rrsets.push_back(result.closest_proof->getRRsig());
-    }
     rrsetsCheck(expected_closest, actual_rrsets.begin(),
                 actual_rrsets.end());
 
@@ -116,9 +112,6 @@ findNSEC3Check(bool expected_matched, uint8_t expected_labels,
     } else {
         ASSERT_TRUE(result.next_proof);
         actual_rrsets.push_back(result.next_proof);
-        if (expected_sig) {
-            actual_rrsets.push_back(result.next_proof->getRRsig());
-        }
         rrsetsCheck(expected_next, actual_rrsets.begin(),
                     actual_rrsets.end());
     }

+ 1 - 2
src/lib/datasrc/tests/faked_nsec3.h

@@ -69,8 +69,7 @@ void
 findNSEC3Check(bool expected_matched, uint8_t expected_labels,
                const std::string& expected_closest,
                const std::string& expected_next,
-               const isc::datasrc::ZoneFinder::FindNSEC3Result& result,
-               bool expected_sig = false);
+               const isc::datasrc::ZoneFinder::FindNSEC3Result& result);
 
 // Perform the shared part of NSEC3 test (shared between in-memory and database
 // tests).

+ 1 - 1
src/lib/datasrc/tests/memory_datasrc_unittest.cc

@@ -2067,7 +2067,7 @@ TEST_F(InMemoryZoneFinderTest, addNSEC3WithRRSIG) {
     // Then look for it.  The NSEC3 should have the RRSIG that was just added.
     findNSEC3Check(true, origin_.getLabelCount(),
                    nsec3_text + "\n" + nsec3_rrsig_text, "",
-                   zone_finder_.findNSEC3(Name("example.org"), false), true);
+                   zone_finder_.findNSEC3(Name("example.org"), false));
 
     // Duplicate add of RRSIG for the same NSEC3 is prohibited.
     EXPECT_THROW(zone_finder_.add(textToRRset(nsec3_rrsig_text)),