Also add DNSKEYRecordContent ordering
)
TKEYRecordContent::TKEYRecordContent() { d_othersize = 0; } // fix CID#1288932
-uint16_t DNSKEYRecordContent::getTag()
+uint16_t DNSKEYRecordContent::getTag() const
{
- string data=this->serialize(DNSName());
+ DNSKEYRecordContent tmp(*this);
+ string data=tmp.serialize(DNSName()); // this can't be const for some reason
const unsigned char* key=(const unsigned char*)data.c_str();
unsigned int keysize=data.length();
public:
DNSKEYRecordContent();
includeboilerplate(DNSKEY)
- uint16_t getTag();
+ uint16_t getTag() const;
uint16_t d_flags;
uint8_t d_protocol;
uint8_t d_algorithm;
string d_key;
+ bool operator<(const DNSKEYRecordContent& rhs) const
+ {
+ return tie(d_flags, d_protocol, d_algorithm, d_key) <
+ tie(rhs.d_flags, rhs.d_protocol, rhs.d_algorithm, rhs.d_key);
+ }
};
class CDNSKEYRecordContent : public DNSRecordContent