summaryrefslogtreecommitdiffstats
path: root/etc/inc/certs.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-05-05 16:27:24 -0400
committerjim-p <jimp@pfsense.org>2011-05-05 16:27:24 -0400
commita59831e7990322b4a9700e0c14089f04106b4188 (patch)
treec4d5c8cc8ad4a9e2a00db02246ab9a1d70499858 /etc/inc/certs.inc
parent461aa9d0ab851837334bd2ddc6db2d208f3d4aac (diff)
downloadpfsense-a59831e7990322b4a9700e0c14089f04106b4188.zip
pfsense-a59831e7990322b4a9700e0c14089f04106b4188.tar.gz
If we have deleted the last cert from the CRL, blank out the text.
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