]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Display correct key ID after assign
authorAki Tuomi <cmouse@cmouse.fi>
Sun, 29 Mar 2015 18:00:01 +0000 (21:00 +0300)
committerAki Tuomi <cmouse@desteem.org>
Mon, 30 Mar 2015 07:30:26 +0000 (10:30 +0300)
pdns/pdnssec.cc

index 4bfc5ed98f4f7eaec2c504cb20ab87fe9c01d3a1..8c0e85cdfbc2edd828296a8562bba58ec206fdaf 100644 (file)
@@ -2116,7 +2116,23 @@ try
        return 1;
      }
 
+     // figure out key id.
+
+     std::vector<DNSBackend::KeyData> keys;
+
+     B.getDomainKeys(zone, 0, keys);
+
+     // validate which one got the key...
+     BOOST_FOREACH(DNSBackend::KeyData& kd, keys) {
+       if (kd.content == iscString.str()) {
+         // it's this one, I guess...
+         id = kd.id;
+         break;
+       }
+     }
+
      cerr << "Module " << module << " slot " << slot << " assigned to " << zone << " with key id " << id << endl;
+
      return 0;
     } else if (cmds[1] == "create-key") {