Before, we would spawn a new UeberBackend in the DNSSECKeeper, but there
was already a transaction going on, so the rectify would never finish,
as rectifyZone would not return.
std::unique_ptr<UeberBackend> b;
if (d_ourDB) {
+ if (!doTransaction) {
+ error = "Can not rectify a zone with a new Ueberbackend inside a transaction.";
+ return false;
+ }
// We don't have a *full* Ueberbackend, just a key-only one.
// Let's create one and use it
b = std::unique_ptr<UeberBackend>(new UeberBackend());
throw;
}
- DNSSECKeeper dk;
+ DNSSECKeeper dk(&B);
string api_rectify;
di.backend->getDomainMetadataOne(zonename, "API-RECTIFY", api_rectify);
if (dk.isSecuredZone(zonename) && !dk.isPresigned(zonename) && api_rectify == "1") {