From 822a0b4e4e7fa634a9f681a300bce61f610beab8 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 5 Nov 2015 09:21:11 +0100 Subject: [PATCH] was using DNSName() to get DNSName(".") - we should make some faster way of getting a root DNSName! --- pdns/dnssecinfra.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns/dnssecinfra.cc b/pdns/dnssecinfra.cc index 3224648b7..4b9e0dc33 100644 --- a/pdns/dnssecinfra.cc +++ b/pdns/dnssecinfra.cc @@ -298,7 +298,7 @@ DNSCryptoKeyEngine* DNSCryptoKeyEngine::makeFromPEMString(DNSKEYRecordContent& d bool sharedDNSSECCompare(const shared_ptr& a, const shared_ptr& b) { - return a->serialize(DNSName(), true, true) < b->serialize(DNSName(), true, true); + return a->serialize(DNSName("."), true, true) < b->serialize(DNSName("."), true, true); } string getMessageForRRSET(const DNSName& qname, const RRSIGRecordContent& rrc, vector >& signRecords) @@ -306,18 +306,18 @@ string getMessageForRRSET(const DNSName& qname, const RRSIGRecordContent& rrc, v sort(signRecords.begin(), signRecords.end(), sharedDNSSECCompare); string toHash; - toHash.append(const_cast(rrc).serialize(DNSName(), true, true)); + toHash.append(const_cast(rrc).serialize(DNSName("."), true, true)); toHash.resize(toHash.size() - rrc.d_signature.length()); // chop off the end, don't sign the signature! BOOST_FOREACH(shared_ptr& add, signRecords) { - toHash.append(qname.toDNSString()); // FIXME400 tolower? + toHash.append(qname.toDNSString()); // FIXME400 tolower? uint16_t tmp=htons(rrc.d_type); toHash.append((char*)&tmp, 2); tmp=htons(1); // class toHash.append((char*)&tmp, 2); uint32_t ttl=htonl(rrc.d_originalttl); toHash.append((char*)&ttl, 4); - string rdata=add->serialize(DNSName(), true, true); + string rdata=add->serialize(DNSName("."), true, true); tmp=htons(rdata.length()); toHash.append((char*)&tmp, 2); toHash.append(rdata); -- 2.40.0