BIND 10 trac1176, updated. b131dd71ce147b4efcece9dd8fba16c51fefa492 [1176] Test for query dnssec positive support

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Aug 25 21:37:22 UTC 2011


The branch, trac1176 has been updated
       via  b131dd71ce147b4efcece9dd8fba16c51fefa492 (commit)
      from  84d83c1d8979e2906971af79f2e41083299beb7e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b131dd71ce147b4efcece9dd8fba16c51fefa492
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Thu Aug 25 23:35:41 2011 +0200

    [1176] Test for query dnssec positive support

-----------------------------------------------------------------------

Summary of changes:
 src/bin/auth/tests/query_unittest.cc |   54 +++++++++++++++++++++++++++++++++-
 1 files changed, 53 insertions(+), 1 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/tests/query_unittest.cc b/src/bin/auth/tests/query_unittest.cc
index 68f0a1d..c389caa 100644
--- a/src/bin/auth/tests/query_unittest.cc
+++ b/src/bin/auth/tests/query_unittest.cc
@@ -141,7 +141,7 @@ private:
     typedef map<RRType, ConstRRsetPtr> RRsetStore;
     typedef map<Name, RRsetStore> Domains;
     Domains domains_;
-    void loadRRset(ConstRRsetPtr rrset) {
+    void loadRRset(RRsetPtr rrset) {
         domains_[rrset->getName()][rrset->getType()] = rrset;
         if (rrset->getName() == delegation_name_ &&
             rrset->getType() == RRType::NS()) {
@@ -149,6 +149,26 @@ private:
         } else if (rrset->getName() == dname_name_ &&
             rrset->getType() == RRType::DNAME()) {
             dname_rrset_ = rrset;
+        // Add some signatures
+        } else if (rrset->getName() == Name("example.com.") &&
+                   rrset->getType() == RRType::NS()) {
+            rrset->addRRsig(RdataPtr(new generic::RRSIG("NS 5 3 3600 "
+                                                        "20000101000000 "
+                                                        "20000201000000 "
+                                                        "12345 example.com. "
+                                                        "FAKEFAKEFAKE")));
+        } else if (rrset->getType() == RRType::A()) {
+            rrset->addRRsig(RdataPtr(new generic::RRSIG("A 5 3 3600 "
+                                                        "20000101000000 "
+                                                        "20000201000000 "
+                                                        "12345 example.com. "
+                                                        "FAKEFAKEFAKE")));
+        } else if (rrset->getType() == RRType::AAAA()) {
+            rrset->addRRsig(RdataPtr(new generic::RRSIG("AAAA 5 3 3600 "
+                                                        "20000101000000 "
+                                                        "20000201000000 "
+                                                        "12345 example.com. "
+                                                        "FAKEFAKEFAKE")));
         }
     }
 
@@ -304,6 +324,38 @@ TEST_F(QueryTest, exactMatch) {
                   www_a_txt, zone_ns_txt, ns_addrs_txt);
 }
 
+TEST_F(QueryTest, dnssecPositive) {
+    // Just like exactMatch, but the signatures should be included as well
+    Query query(memory_client, qname, qtype, response, true);
+    EXPECT_NO_THROW(query.process());
+    // find match rrset
+    responseCheck(response, Rcode::NOERROR(), AA_FLAG, 1, 3, 3,
+                  (www_a_txt + std::string("www.example.com. 3600 IN RRSIG "
+                                           "AAAA 5 3 3600 20000101000000 "
+                                           "20000201000000 12345 example.com. "
+                                           "FAKEFAKEFAKE\n")).c_str(),
+                  (zone_ns_txt + std::string("example.com. 3600 IN RRSIG NS 5 "
+                                             "3 3600 20000101000000 "
+                                             "20000201000000 12345 "
+                                             "example.com. FAKEFAKEFAKE\n")).
+                  c_str(),
+                  (ns_addrs_txt + std::string("glue.delegation.example.com. "
+                                              "3600 IN RRSIG A 5 3 3600 "
+                                              "20000101000000 20000201000000 "
+                                              "12345 example.com. "
+                                              "FAKEFAKEFAKE\n"
+                                              "glue.delegation.example.com. "
+                                              "3600 IN RRSIG AAAA 5 3 3600 "
+                                              "20000101000000 20000201000000 "
+                                              "12345 example.com. "
+                                              "FAKEFAKEFAKE\n"
+                                              "noglue.example.com. 3600 IN "
+                                              "RRSIG A 5 3 3600 "
+                                              "20000101000000 20000201000000 "
+                                              "12345 example.com. "
+                                              "FAKEFAKEFAKE\n")).c_str());
+}
+
 TEST_F(QueryTest, exactAddrMatch) {
     // find match rrset, omit additional data which has already been provided
     // in the answer section from the additional.




More information about the bind10-changes mailing list