]> granicus.if.org Git - pdns/commitdiff
remove vestiges of RSA-centrism from the DNSKEY code - at assumed every key was an...
authorBert Hubert <bert.hubert@netherlabs.nl>
Thu, 27 Jan 2011 09:35:58 +0000 (09:35 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Thu, 27 Jan 2011 09:35:58 +0000 (09:35 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1914 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dnsrecords.cc
pdns/dnsrecords.hh

index f4ee12728b98ab4fbb44f65a8892e42492044dd5..a7f056525ade23f0d733711aa31a9e33c0d0d5c3 100644 (file)
@@ -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);
index 4a655f540502138cf047fd9cbe535b08712d3053..c0b2089dfa94249ded5537ebb6961ea33b90090f 100644 (file)
@@ -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