return true;
}
+bool DNSName::isWildcard() const
+{
+ if(d_storage.empty())
+ return false;
+ auto p = d_storage.begin();
+ return (*p == 0x01 && *++p == '*');
+}
+
unsigned int DNSName::countLabels() const
{
unsigned int count=0;
void prependRawLabel(const std::string& str); //!< Prepend this unescaped label
std::vector<std::string> getRawLabels() const; //!< Individual raw unescaped labels
bool chopOff(); //!< Turn www.powerdns.com. into powerdns.com., returns false for .
+ bool isWildcard() const;
unsigned int countLabels() const;
bool empty() const { return countLabels()==0; } // FIXME remove me?
void clear() { trimToLabels(0); } // FIXME remove me?
RRSIGRecordContent rrc;
rrc.d_type=signQType;
- rrc.d_labels=signQName.countLabels();
+ rrc.d_labels=signQName.countLabels()-signQName.isWildcard();
rrc.d_originalttl=signTTL;
rrc.d_siginception=startOfWeek - 7*86400; // XXX should come from zone metadata
rrc.d_sigexpire=startOfWeek + 14*86400;