From a59831e7990322b4a9700e0c14089f04106b4188 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 5 May 2011 16:27:24 -0400 Subject: If we have deleted the last cert from the CRL, blank out the text. --- etc/inc/certs.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'etc/inc/certs.inc') 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; } } -- cgit v1.1