summaryrefslogtreecommitdiffstats
path: root/etc/inc/certs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/certs.inc')
-rw-r--r--etc/inc/certs.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/certs.inc b/etc/inc/certs.inc
index 2b192c1..c6cd787 100644
--- a/etc/inc/certs.inc
+++ b/etc/inc/certs.inc
@@ -514,7 +514,10 @@ function cert_unrevoke($cert, & $crl) {
foreach ($crl['cert'] as $id => $rcert) {
if (($rcert['refid'] == $cert['refid']) || ($rcert['descr'] == $cert['descr'])) {
unset($crl['cert'][$id]);
- crl_update($crl);
+ if (count($crl['cert']) == 0)
+ unset($crl['text']);
+ else
+ crl_update($crl);
return true;
}
}
OpenPOWER on IntegriCloud