Clean up revoked certificates when done updating CRL

pull/1/head
Timothy Pearson 9 years ago
parent ba7bc5afac
commit 30b251b05b

@ -4418,6 +4418,13 @@ int LDAPManager::generatePKICRL(int expirydays, LDAPRealmConfig realmcfg, TQStri
return -1; return -1;
} }
if (fileExists(revoked_certfile.ascii())) {
if (unlink(revoked_certfile.ascii()) < 0) {
if (errstr) *errstr = TQString("Unable to unlink \"%1\"").arg(revoked_certfile);
return -1;
}
}
LDAPUserInfoList::Iterator it; LDAPUserInfoList::Iterator it;
for (it = userList.begin(); it != userList.end(); ++it) { for (it = userList.begin(); it != userList.end(); ++it) {
LDAPUserInfo user = *it; LDAPUserInfo user = *it;
@ -4451,6 +4458,13 @@ int LDAPManager::generatePKICRL(int expirydays, LDAPRealmConfig realmcfg, TQStri
if (errstr) *errstr = TQString("Execution of \"%s\" failed").arg(command); if (errstr) *errstr = TQString("Execution of \"%s\" failed").arg(command);
return -1; return -1;
} }
if (fileExists(revoked_certfile.ascii())) {
if (unlink(revoked_certfile.ascii()) < 0) {
if (errstr) *errstr = TQString("Unable to unlink \"%1\"").arg(revoked_certfile);
return -1;
}
}
} }
} }
} }

Loading…
Cancel
Save