Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
77ba8639
Commit
77ba8639
authored
Aug 25, 2011
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/tests/database_unittest.cc
View file @
77ba8639
...
...
@@ -461,6 +461,7 @@ private:
// Something for wildcards
addRecord
(
"A"
,
"3600"
,
""
,
"192.0.2.5"
);
addRecord
(
"RRSIG"
,
"3600"
,
""
,
"A 5 3 3600 20000101000000 20000201000000 12345 example.org. FAKEFAKEFAKE"
);
addCurName
(
"*.wild.example.org."
);
addRecord
(
"AAAA"
,
"3600"
,
""
,
"2001:db8::5"
);
addCurName
(
"cancel.here.wild.example.org."
);
...
...
@@ -1161,7 +1162,10 @@ TEST_F(DatabaseClientTest, wildcard) {
shared_ptr
<
DatabaseClient
::
Finder
>
finder
(
getFinder
());
// 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_sig_rdatas_
.
push_back
(
"A 5 3 3600 20000101000000 20000201000000 "
"12345 example.org. FAKEFAKEFAKE"
);
doFindTest
(
finder
,
isc
::
dns
::
Name
(
"a.wild.example.org"
),
isc
::
dns
::
RRType
::
A
(),
isc
::
dns
::
RRType
::
A
(),
isc
::
dns
::
RRTTL
(
3600
),
ZoneFinder
::
SUCCESS
,
expected_rdatas_
,
...
...
@@ -1171,6 +1175,7 @@ TEST_F(DatabaseClientTest, wildcard) {
isc
::
dns
::
RRTTL
(
3600
),
ZoneFinder
::
SUCCESS
,
expected_rdatas_
,
expected_sig_rdatas_
);
expected_rdatas_
.
clear
();
expected_sig_rdatas_
.
clear
();
doFindTest
(
finder
,
isc
::
dns
::
Name
(
"a.wild.example.org"
),
isc
::
dns
::
RRType
::
AAAA
(),
isc
::
dns
::
RRType
::
AAAA
(),
isc
::
dns
::
RRTTL
(
3600
),
ZoneFinder
::
NXRRSET
,
expected_rdatas_
,
...
...
@@ -1182,11 +1187,14 @@ TEST_F(DatabaseClientTest, wildcard) {
// Direct request for thi wildcard
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"
),
isc
::
dns
::
RRType
::
A
(),
isc
::
dns
::
RRType
::
A
(),
isc
::
dns
::
RRTTL
(
3600
),
ZoneFinder
::
SUCCESS
,
expected_rdatas_
,
expected_sig_rdatas_
);
expected_rdatas_
.
clear
();
expected_sig_rdatas_
.
clear
();
doFindTest
(
finder
,
isc
::
dns
::
Name
(
"*.wild.example.org"
),
isc
::
dns
::
RRType
::
AAAA
(),
isc
::
dns
::
RRType
::
AAAA
(),
isc
::
dns
::
RRTTL
(
3600
),
ZoneFinder
::
NXRRSET
,
expected_rdatas_
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment