Commit 77ba8639 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[1176] Test that wildcards don't break RRSIGs

It works, but just making sure it works even with wildcards.
parent 30df4357
...@@ -461,6 +461,7 @@ private: ...@@ -461,6 +461,7 @@ private:
// Something for wildcards // Something for wildcards
addRecord("A", "3600", "", "192.0.2.5"); addRecord("A", "3600", "", "192.0.2.5");
addRecord("RRSIG", "3600", "", "A 5 3 3600 20000101000000 20000201000000 12345 example.org. FAKEFAKEFAKE");
addCurName("*.wild.example.org."); addCurName("*.wild.example.org.");
addRecord("AAAA", "3600", "", "2001:db8::5"); addRecord("AAAA", "3600", "", "2001:db8::5");
addCurName("cancel.here.wild.example.org."); addCurName("cancel.here.wild.example.org.");
...@@ -1161,7 +1162,10 @@ TEST_F(DatabaseClientTest, wildcard) { ...@@ -1161,7 +1162,10 @@ TEST_F(DatabaseClientTest, wildcard) {
shared_ptr<DatabaseClient::Finder> finder(getFinder()); shared_ptr<DatabaseClient::Finder> finder(getFinder());
// First, simple wildcard match // First, simple wildcard match
// Check also that the RRSIG is added from the wildcard (not modified)
expected_rdatas_.push_back("192.0.2.5"); expected_rdatas_.push_back("192.0.2.5");
expected_sig_rdatas_.push_back("A 5 3 3600 20000101000000 20000201000000 "
"12345 example.org. FAKEFAKEFAKE");
doFindTest(finder, isc::dns::Name("a.wild.example.org"), doFindTest(finder, isc::dns::Name("a.wild.example.org"),
isc::dns::RRType::A(), isc::dns::RRType::A(), isc::dns::RRType::A(), isc::dns::RRType::A(),
isc::dns::RRTTL(3600), ZoneFinder::SUCCESS, expected_rdatas_, isc::dns::RRTTL(3600), ZoneFinder::SUCCESS, expected_rdatas_,
...@@ -1171,6 +1175,7 @@ TEST_F(DatabaseClientTest, wildcard) { ...@@ -1171,6 +1175,7 @@ TEST_F(DatabaseClientTest, wildcard) {
isc::dns::RRTTL(3600), ZoneFinder::SUCCESS, expected_rdatas_, isc::dns::RRTTL(3600), ZoneFinder::SUCCESS, expected_rdatas_,
expected_sig_rdatas_); expected_sig_rdatas_);
expected_rdatas_.clear(); expected_rdatas_.clear();
expected_sig_rdatas_.clear();
doFindTest(finder, isc::dns::Name("a.wild.example.org"), doFindTest(finder, isc::dns::Name("a.wild.example.org"),
isc::dns::RRType::AAAA(), isc::dns::RRType::AAAA(), isc::dns::RRType::AAAA(), isc::dns::RRType::AAAA(),
isc::dns::RRTTL(3600), ZoneFinder::NXRRSET, expected_rdatas_, isc::dns::RRTTL(3600), ZoneFinder::NXRRSET, expected_rdatas_,
...@@ -1182,11 +1187,14 @@ TEST_F(DatabaseClientTest, wildcard) { ...@@ -1182,11 +1187,14 @@ TEST_F(DatabaseClientTest, wildcard) {
// Direct request for thi wildcard // Direct request for thi wildcard
expected_rdatas_.push_back("192.0.2.5"); expected_rdatas_.push_back("192.0.2.5");
expected_sig_rdatas_.push_back("A 5 3 3600 20000101000000 20000201000000 "
"12345 example.org. FAKEFAKEFAKE");
doFindTest(finder, isc::dns::Name("*.wild.example.org"), doFindTest(finder, isc::dns::Name("*.wild.example.org"),
isc::dns::RRType::A(), isc::dns::RRType::A(), isc::dns::RRType::A(), isc::dns::RRType::A(),
isc::dns::RRTTL(3600), ZoneFinder::SUCCESS, expected_rdatas_, isc::dns::RRTTL(3600), ZoneFinder::SUCCESS, expected_rdatas_,
expected_sig_rdatas_); expected_sig_rdatas_);
expected_rdatas_.clear(); expected_rdatas_.clear();
expected_sig_rdatas_.clear();
doFindTest(finder, isc::dns::Name("*.wild.example.org"), doFindTest(finder, isc::dns::Name("*.wild.example.org"),
isc::dns::RRType::AAAA(), isc::dns::RRType::AAAA(), isc::dns::RRType::AAAA(), isc::dns::RRType::AAAA(),
isc::dns::RRTTL(3600), ZoneFinder::NXRRSET, expected_rdatas_, isc::dns::RRTTL(3600), ZoneFinder::NXRRSET, expected_rdatas_,
......
Supports Markdown
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