vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
No wrap test case:
a.example.org. -> d.example.org. denies the existence of b.example.org.
*/
- addNSECRecordToLW(DNSName("a.example.org."), DNSName("d.example.org"), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("a.example.org."), DNSName("d.example.org"), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("example.org."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
/* add wildcard denial */
recordContents.clear();
signatureContents.clear();
- addNSECRecordToLW(DNSName("example.org."), DNSName("+.example.org"), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("example.org."), DNSName("+.example.org"), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("example.org."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
Wrap case 1 test case:
z.example.org. -> b.example.org. denies the existence of a.example.org.
*/
- addNSECRecordToLW(DNSName("z.example.org."), DNSName("b.example.org"), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("z.example.org."), DNSName("b.example.org"), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("example.org."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
Wrap case 2 test case:
y.example.org. -> a.example.org. denies the existence of z.example.org.
*/
- addNSECRecordToLW(DNSName("y.example.org."), DNSName("a.example.org"), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("y.example.org."), DNSName("a.example.org"), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("example.org."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
Only one NSEC in the whole zone test case:
a.example.org. -> a.example.org. denies the existence of b.example.org.
*/
- addNSECRecordToLW(DNSName("a.example.org."), DNSName("a.example.org"), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("a.example.org."), DNSName("a.example.org"), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("example.org."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
The RRSIG from "." denies the existence of anything between a. and c.,
including b.
*/
- addNSECRecordToLW(DNSName("a."), DNSName("c."), {QType::NS}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("a."), DNSName("c."), { QType::NS }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
/* add wildcard denial */
recordContents.clear();
signatureContents.clear();
- addNSECRecordToLW(DNSName("."), DNSName("+"), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("."), DNSName("+"), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
signer field that is shorter than the owner name of the NSEC RR) it can't
be used to deny anything except the whole name or a DS.
*/
- addNSECRecordToLW(DNSName("a."), DNSName("b."), {QType::NS}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("a."), DNSName("b."), { QType::NS }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
NS should be set if it was proving an insecure delegation, let's check that
we correctly detect that it's not.
*/
- addNSECRecordToLW(DNSName("a."), DNSName("b."), {}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("a."), DNSName("b."), { }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
- addNSECRecordToLW(DNSName("a.powerdns.com."), DNSName("a.c.powerdns.com."), {QType::CNAME}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("a.powerdns.com."), DNSName("a.c.powerdns.com."), { QType::CNAME }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("powerdns.com."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
- addNSEC3UnhashedRecordToLW(DNSName("a.powerdns.com."), DNSName("powerdns.com."), "whatever", {QType::CNAME}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSEC3UnhashedRecordToLW(DNSName("a.powerdns.com."), DNSName("powerdns.com."), "whatever", { QType::CNAME }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("powerdns.com."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
- addNSECRecordToLW(DNSName("a.powerdns.com."), DNSName("d.powerdns.com"), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("a.powerdns.com."), DNSName("d.powerdns.com"), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("powerdns.com."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
- addNSEC3NarrowRecordToLW(DNSName("a.powerdns.com."), DNSName("powerdns.com."), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSEC3NarrowRecordToLW(DNSName("a.powerdns.com."), DNSName("powerdns.com."), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("powerdns.com."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
recordContents.clear();
signatureContents.clear();
records.clear();
- addNSEC3UnhashedRecordToLW(DNSName("powerdns.com."), DNSName("powerdns.com."), "whatever", {QType::A, QType::TXT, QType::RRSIG, QType::NSEC}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSEC3UnhashedRecordToLW(DNSName("powerdns.com."), DNSName("powerdns.com."), "whatever", { QType::A, QType::TXT, QType::RRSIG, QType::NSEC }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("powerdns.com."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
- addNSECRecordToLW(DNSName("a.powerdns.com."), DNSName("a.c.powerdns.com."), {QType::A}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName("a.powerdns.com."), DNSName("a.c.powerdns.com."), { QType::A }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("powerdns.com."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
/* if we add the wildcard denial proof, we should get a NXDOMAIN proof for b.powerdns.com */
recordContents.clear();
signatureContents.clear();
- addNSECRecordToLW(DNSName(").powerdns.com."), DNSName("+.powerdns.com."), {}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSECRecordToLW(DNSName(").powerdns.com."), DNSName("+.powerdns.com."), { }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("powerdns.com."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
records.clear();
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
signer field that is shorter than the owner name of the NSEC RR) it can't
be used to deny anything except the whole name or a DS.
*/
- addNSEC3UnhashedRecordToLW(DNSName("a."), DNSName("."), "whatever", {QType::NS}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSEC3UnhashedRecordToLW(DNSName("a."), DNSName("."), "whatever", { QType::NS }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
recordContents.clear();
signatureContents.clear();
records.clear();
- addNSEC3NarrowRecordToLW(DNSName("sub.a."), DNSName("."), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC3}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSEC3NarrowRecordToLW(DNSName("sub.a."), DNSName("."), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC3 }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
recordContents.clear();
signatureContents.clear();
records.clear();
- addNSEC3NarrowRecordToLW(DNSName("*.a."), DNSName("."), {QType::A, QType::TXT, QType::RRSIG, QType::NSEC3}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSEC3NarrowRecordToLW(DNSName("*.a."), DNSName("."), { QType::A, QType::TXT, QType::RRSIG, QType::NSEC3 }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/* adding a NSEC3 with more iterations that we support */
- addNSEC3UnhashedRecordToLW(DNSName("a."), DNSName("."), "whatever", {QType::AAAA}, 600, records, g_maxNSEC3Iterations + 100);
- recordContents.push_back(records.at(0).d_content);
+ addNSEC3UnhashedRecordToLW(DNSName("a."), DNSName("."), "whatever", { QType::AAAA }, 600, records, g_maxNSEC3Iterations + 100);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));
vector<DNSRecord> records;
- vector<shared_ptr<DNSRecordContent>> recordContents;
+ sortedRecords_t recordContents;
vector<shared_ptr<RRSIGRecordContent>> signatureContents;
/*
NS should be set if it was proving an insecure delegation, let's check that
we correctly detect that it's not.
*/
- addNSEC3UnhashedRecordToLW(DNSName("a."), DNSName("."), "whatever", {}, 600, records);
- recordContents.push_back(records.at(0).d_content);
+ addNSEC3UnhashedRecordToLW(DNSName("a."), DNSName("."), "whatever", { }, 600, records);
+ recordContents.insert(records.at(0).d_content);
addRRSIG(keys, records, DNSName("."), 300);
signatureContents.push_back(getRR<RRSIGRecordContent>(records.at(1)));