static bool secureZone(DNSSECKeeper& dk, const DNSName& zone)
{
// temp var for addKey
- int64_t id;
+ int64_t id{-1};
// parse attribute
string k_algo = ::arg()["default-ksk-algorithm"];
return EXIT_FAILURE;
}
}
- int64_t id;
+ int64_t id{-1};
if (!dk.addKey(zone, keyOrZone, algorithm, id, bits, active, published)) {
cerr<<"Adding key failed, perhaps DNSSEC not enabled in configuration?"<<endl;
return 1;
}
dpk.setKey(key, flags, algo);
- int64_t id;
+ int64_t id{-1};
if (!dk.addKey(DNSName(zone), dpk, id)) {
cerr << "Adding key failed, perhaps DNSSEC not enabled in configuration?" << endl;
return 1;
}
dpk.setKey(key, flags, algo);
- int64_t id;
+ int64_t id{-1};
if (!dk.addKey(DNSName(zone), dpk, id, active, published)) {
cerr<<"Adding key failed, perhaps DNSSEC not enabled in configuration?"<<endl;
return 1;
return 1;
}
- int64_t id;
bool keyOrZone = (cmds.at(4) == "ksk" ? true : false);
string module = cmds.at(5);
string slot = cmds.at(6);
// make sure this key isn't being reused.
B.getDomainKeys(zone, keys);
- id = -1;
+ int64_t id{-1};
for(DNSBackend::KeyData& kd : keys) {
if (kd.content == iscString.str()) {
// it's this one, I guess...
int z_size = arg().asNum("default-zsk-size");
if (k_algo != -1) {
- int64_t id;
+ int64_t id{-1};
if (!dk.addKey(zonename, true, k_algo, id, k_size)) {
throwUnableToSecure(zonename);
}
}
if (z_algo != -1) {
- int64_t id;
+ int64_t id{-1};
if (!dk.addKey(zonename, false, z_algo, id, z_size)) {
throwUnableToSecure(zonename);
}