function cert_unrevoke($cert, &$crl) { global $config; if (!is_crl_internal($crl)) { return false; } foreach ($crl['cert'] as $id => $rcert) { if ($rcert['refid'] == $cert['refid'] || $rcert['descr'] == $cert['descr']) { unset($crl['cert'][$id]); if (count($crl['cert']) == 0) { // Protect against accidentally switching the type to imported, for older CRLs if (!isset($crl['method'])) { $crl['method'] = "internal"; } crl_update($crl); } else { crl_update($crl); } return true; } } return false; }
if ($acrl['refid'] == $thiscrl['refid']) { unset($a_crl[$cid]); } } write_config("Deleted CRL {$name}."); $savemsg = sprintf(gettext("Certificate Revocation List %s successfully deleted"), $name); } } if ($act == "new") { $pconfig['method'] = $_GET['method']; $pconfig['caref'] = $_GET['caref']; $pconfig['lifetime'] = "9999"; $pconfig['serial'] = "0"; } if ($act == "exp") { crl_update($thiscrl); $exp_name = urlencode("{$thiscrl['descr']}.crl"); $exp_data = base64_decode($thiscrl['text']); $exp_size = strlen($exp_data); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename={$exp_name}"); header("Content-Length: {$exp_size}"); echo $exp_data; exit; } if ($act == "addcert") { if ($_POST) { unset($input_errors); $pconfig = $_POST; if (!$pconfig['crlref'] || !$pconfig['certref']) { pfSenseHeader("system_crlmanager.php");