mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
Add a unit test case for converting \000\009
Sanity checking that this domain converts to the key I am expecting. Also fix some of the other names that had trailing 0x02 bits.
This commit is contained in:
committed by
Evan Hunt
parent
a0bd1e67cd
commit
ada46eb9f5
@@ -56,9 +56,14 @@ ISC_RUN_TEST_IMPL(qpkey_name) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.namestr = "\\000",
|
.namestr = "\\000",
|
||||||
.key = { 0x03, 0x03, 0x02, 0x02 },
|
.key = { 0x03, 0x03, 0x02 },
|
||||||
.len = 3,
|
.len = 3,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.namestr = "\\000\\009",
|
||||||
|
.key = { 0x03, 0x03, 0x03, 0x0c, 0x02 },
|
||||||
|
.len = 5,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.namestr = "com",
|
.namestr = "com",
|
||||||
.key = { 0x16, 0x22, 0x20, 0x02 },
|
.key = { 0x16, 0x22, 0x20, 0x02 },
|
||||||
@@ -72,19 +77,19 @@ ISC_RUN_TEST_IMPL(qpkey_name) {
|
|||||||
{
|
{
|
||||||
.namestr = "example.com.",
|
.namestr = "example.com.",
|
||||||
.key = { 0x02, 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14,
|
.key = { 0x02, 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14,
|
||||||
0x20, 0x23, 0x1f, 0x18, 0x02, 0x02 },
|
0x20, 0x23, 0x1f, 0x18, 0x02 },
|
||||||
.len = 13,
|
.len = 13,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.namestr = "example.com",
|
.namestr = "example.com",
|
||||||
.key = { 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14, 0x20,
|
.key = { 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14, 0x20,
|
||||||
0x23, 0x1f, 0x18, 0x02, 0x02 },
|
0x23, 0x1f, 0x18, 0x02 },
|
||||||
.len = 12,
|
.len = 12,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.namestr = "EXAMPLE.COM",
|
.namestr = "EXAMPLE.COM",
|
||||||
.key = { 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14, 0x20,
|
.key = { 0x16, 0x22, 0x20, 0x02, 0x18, 0x2b, 0x14, 0x20,
|
||||||
0x23, 0x1f, 0x18, 0x02, 0x02 },
|
0x23, 0x1f, 0x18, 0x02 },
|
||||||
.len = 12,
|
.len = 12,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -128,6 +133,9 @@ ISC_RUN_TEST_IMPL(qpkey_sort) {
|
|||||||
} testcases[] = {
|
} testcases[] = {
|
||||||
{ .namestr = "." },
|
{ .namestr = "." },
|
||||||
{ .namestr = "\\000." },
|
{ .namestr = "\\000." },
|
||||||
|
{ .namestr = "\\000.\\000." },
|
||||||
|
{ .namestr = "\\000\\009." },
|
||||||
|
{ .namestr = "\\007." },
|
||||||
{ .namestr = "example.com." },
|
{ .namestr = "example.com." },
|
||||||
{ .namestr = "EXAMPLE.COM." },
|
{ .namestr = "EXAMPLE.COM." },
|
||||||
{ .namestr = "www.example.com." },
|
{ .namestr = "www.example.com." },
|
||||||
|
Reference in New Issue
Block a user