diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-04 07:30:28 +0000 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-04 07:30:28 +0000 |
commit | 30b251b05be0d63fa0a405025bdf1ffca7037a5a (patch) | |
tree | 512e1a95e5b134e50ae65b88a214b6917f656b3a /src/libtdeldap.cpp | |
parent | ba7bc5afacb793fba3724dd526ade68a5db95927 (diff) | |
download | libtdeldap-30b251b05be0d63fa0a405025bdf1ffca7037a5a.tar.gz libtdeldap-30b251b05be0d63fa0a405025bdf1ffca7037a5a.zip |
Clean up revoked certificates when done updating CRL
Diffstat (limited to 'src/libtdeldap.cpp')
-rw-r--r-- | src/libtdeldap.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp index 63ff769..ea67fd6 100644 --- a/src/libtdeldap.cpp +++ b/src/libtdeldap.cpp @@ -4418,6 +4418,13 @@ int LDAPManager::generatePKICRL(int expirydays, LDAPRealmConfig realmcfg, TQStri 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; for (it = userList.begin(); it != userList.end(); ++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); 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; + } + } } } } |