From 86c979f5e3298d7681cfce12e8319f2a5616eafc Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Sun, 29 Mar 2015 21:00:01 +0300 Subject: [PATCH] Display correct key ID after assign --- pdns/pdnssec.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 4bfc5ed98f..8c0e85cdfb 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -2116,7 +2116,23 @@ try return 1; } + // figure out key id. + + std::vector 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") { -- 2.47.2