From: Bert Hubert Date: Thu, 27 Jan 2011 09:35:58 +0000 (+0000) Subject: remove vestiges of RSA-centrism from the DNSKEY code - at assumed every key was an... X-Git-Tag: auth-3.0~333 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=727f3edbf91d1693c06fbe7bc792b99323c44579;p=pdns remove vestiges of RSA-centrism from the DNSKEY code - at assumed every key was an RSA key! git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1914 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index f4ee12728..a7f056525 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -240,7 +240,6 @@ boilerplate_conv(RRSIG, 46, conv.xfrType(d_type); conv.xfr8BitInt(d_algorithm); conv.xfr8BitInt(d_labels); - conv.xfr32BitInt(d_originalttl); conv.xfrTime(d_sigexpire); conv.xfrTime(d_siginception); @@ -274,35 +273,6 @@ uint16_t DNSKEYRecordContent::getTag() return ac & 0xFFFF; } -void DNSKEYRecordContent::getExpLen(uint16_t& startPos, uint16_t& expLen) const -{ - unsigned char* decoded=(unsigned char*) d_key.c_str(); - if(decoded[0] != 0) { - startPos=1; - expLen=decoded[0]; - } - else { - startPos=3; - expLen=decoded[1]*0xff + decoded[2]; // XXX FIXME - } -} - -string DNSKEYRecordContent::getExponent() const -{ - uint16_t startPos, expLen; - getExpLen(startPos, expLen); - return d_key.substr(startPos, expLen); -} - -string DNSKEYRecordContent::getModulus() const -{ - uint16_t startPos, expLen; - getExpLen(startPos, expLen); - - return d_key.substr(startPos+expLen); -} - - // "fancy records" boilerplate_conv(URL, QType::URL, conv.xfrLabel(d_url); diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index 4a655f540..c0b2089df 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -231,15 +231,11 @@ public: DNSKEYRecordContent(); includeboilerplate(DNSKEY) uint16_t getTag(); - string getExponent() const; - string getModulus() const; uint16_t d_flags; uint8_t d_protocol; uint8_t d_algorithm; string d_key; -private: - void getExpLen(uint16_t& startPos, uint16_t& expLen) const; }; class DSRecordContent : public DNSRecordContent