]> granicus.if.org Git - pdns/commitdiff
fix up p11 plus binddnssec DNSName adjustments
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 27 Sep 2015 22:06:35 +0000 (00:06 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 27 Sep 2015 22:06:35 +0000 (00:06 +0200)
modules/bindbackend/binddnssec.cc
pdns/pdnssec.cc

index 2660439d803b1e073538d339a991e885ce27b78b..30bc7f8cd8aa93af7dc428d01009ea2551000bf0 100644 (file)
@@ -369,8 +369,8 @@ bool Bind2Backend::getTSIGKey(const DNSName& name, DNSName* algorithm, string* c
     content->clear();
     while(d_getTSIGKeyQuery_stmt->hasNextRow()) {
       d_getTSIGKeyQuery_stmt->nextRow(row);
-      if(row.size() >= 2 && (algorithm->empty() || *algorithm == row[0])) {
-        *algorithm = row[0];
+      if(row.size() >= 2 && (algorithm->empty() || *algorithm == DNSName(row[0]))) {
+        *algorithm = DNSName(row[0]);
         *content = row[1];
       }
     }
@@ -432,8 +432,8 @@ bool Bind2Backend::getTSIGKeys(std::vector< struct TSIGKey > &keys)
     while(d_getTSIGKeysQuery_stmt->hasNextRow()) {
       d_getTSIGKeysQuery_stmt->nextRow(row);
       struct TSIGKey key;
-      key.name = row[0];
-      key.algorithm = row[1];
+      key.name = DNSName(row[0]);
+      key.algorithm = DNSName(row[1]);
       key.key = row[2];
       keys.push_back(key);
     }
index f006cf5e013242598ba1630fd1032e9e71f27535..c56ac8f5007e5e310eef70e30f8566642aa86b75 100644 (file)
@@ -2178,7 +2178,7 @@ try
         return 1;
       }
 
-      string zone = cmds[2];
+      DNSName zone(cmds[2]);
 
       // verify zone
       if (!B.getDomainInfo(zone, di)) {
@@ -2257,7 +2257,7 @@ try
         return 1;
       }
       DomainInfo di;
-      string zone = cmds[2];
+      DNSName zone(cmds[2]);
       unsigned int id;
       int bits = 2048;
       // verify zone