content->clear();
while(d_getTSIGKeyQuery_stmt->hasNextRow()) {
d_getTSIGKeyQuery_stmt->nextRow(row);
- if(row.size() >= 2 && (!algorithm->countLabels() || *algorithm==row[0])) {
+ if(row.size() >= 2 && (algorithm->empty() || *algorithm==row[0])) {
*algorithm = row[0];
*content = row[1];
}
}
DNSName algoName = trc->d_algoName; // FIXME
- if (algoName == DNSName("hmac-md5.sig-alg.reg.int"))
- algoName = DNSName("hmac-md5");
+ if (algoName == "hmac-md5.sig-alg.reg.int")
+ algoName = "hmac-md5";
if (algoName == "gss-tsig") {
if (!gss_verify_signature(*keyname, message, trc->d_mac)) {
L<<Logger::Error<<"Packet for domain '"<<q->qdomain.toString()<<"' denied: can't find TSIG key with name '"<<keyname->toString()<<"' and algorithm '"<<algoName.toString()<<"'"<<endl;
return false;
}
- if (trc->d_algoName == DNSName("hmac-md5"))
- trc->d_algoName += DNSName("sig-alg.reg.int.");
+ if (trc->d_algoName == "hmac-md5")
+ trc->d_algoName += "sig-alg.reg.int";
TSIGHashEnum algo;
if(!getTSIGHashEnum(trc->d_algoName, algo)) {
// cerr<<"Adding TSIG to notification, key name: '"<<tsigkeyname<<"', algo: '"<<tsigalgorithm<<"', secret: "<<Base64Encode(tsigsecret)<<endl;
TSIGRecordContent trc;
if (tsigalgorithm == "hmac-md5")
- trc.d_algoName = tsigalgorithm + ".sig-alg.reg.int.";
+ trc.d_algoName = tsigalgorithm + "sig-alg.reg.int";
else
trc.d_algoName = tsigalgorithm;
trc.d_time = time(0);
if(!tsigkeyname.empty()) {
if (tsigalgorithm == "hmac-md5")
- d_trc.d_algoName = tsigalgorithm + ".sig-alg.reg.int.";
+ d_trc.d_algoName = tsigalgorithm + "sig-alg.reg.int";
else
d_trc.d_algoName = tsigalgorithm;
d_trc.d_time = time(0);
string keyname("pdns-b-aa");
TSIGRecordContent trc;
- trc.d_algoName="hmac-md5.sig-alg.reg.int.";
+ trc.d_algoName="hmac-md5.sig-alg.reg.int";
trc.d_time=time(0);
trc.d_fudge=300;
trc.d_origID=ntohs(pw.getHeader()->id);