Permalink
Browse files

Display correct key ID after assign

  • Loading branch information...
1 parent fc96b5e commit 0600350b8e2f570b68e9080e8d5b3414412e297d @cmouse cmouse committed with cmouse Mar 29, 2015
Showing with 16 additions and 0 deletions.
  1. +16 −0 pdns/pdnssec.cc
View
@@ -2016,7 +2016,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") {

0 comments on commit 0600350

Please sign in to comment.