cerr<<"Invalid KEY-ID '"<<cmds[2]<<"'"<<endl;
return 1;
}
+ try {
+ dk.getKeyById(zone, id);
+ } catch (std::exception& e) {
+ cerr<<e.what()<<endl;
+ return 1;
+ }
if (!dk.activateKey(zone, id)) {
cerr<<"Activation of key failed"<<endl;
return 1;
cerr<<"Invalid KEY-ID"<<endl;
return 1;
}
+ try {
+ dk.getKeyById(zone, id);
+ } catch (std::exception& e) {
+ cerr<<e.what()<<endl;
+ return 1;
+ }
if (!dk.deactivateKey(zone, id)) {
cerr<<"Deactivation of key failed"<<endl;
return 1;
cerr<<"Invalid KEY-ID '"<<cmds[2]<<"'"<<endl;
return 1;
}
+ try {
+ dk.getKeyById(zone, id);
+ } catch (std::exception& e) {
+ cerr<<e.what()<<endl;
+ return 1;
+ }
if (!dk.publishKey(zone, id)) {
cerr<<"Publishing of key failed"<<endl;
return 1;
cerr<<"Invalid KEY-ID '"<<cmds[2]<<"'"<<endl;
return 1;
}
+ try {
+ dk.getKeyById(zone, id);
+ } catch (std::exception& e) {
+ cerr<<e.what()<<endl;
+ return 1;
+ }
if (!dk.unpublishKey(zone, id)) {
cerr<<"Unpublishing of key failed"<<endl;
return 1;