System/Trust/Revocation - Fix inconsistent is_crl_internal() implementation and make sure we always generate a crl when saved

This commit is contained in:
Ad Schellevis 2022-10-06 11:23:36 +02:00
parent 26ccc7839f
commit 9a77be0040
2 changed files with 2 additions and 1 deletions

View File

@ -824,7 +824,7 @@ function is_openvpn_server_crl($crlref)
function is_crl_internal($crl)
{
return (!(!empty($crl['text']) && empty($crl['cert'])) || ($crl["crlmethod"] ?? '' == "internal"));
return $crl["crlmethod"] ?? '' == "internal";
}
function cert_get_cn($crt, $isref = false)

View File

@ -235,6 +235,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$crl['serial'] = empty($pconfig['serial']) ? 9999 : $pconfig['serial'];
$crl['lifetime'] = empty($pconfig['lifetime']) ? 9999 : $pconfig['lifetime'];
$crl['cert'] = array();
crl_update($crl);
}
if (!isset($id)) {