Skip to content

Commit 5326b92

Browse files
fix(crl): respect disabled toggle when CRL URL list is empty
When the admin disables external CRL validation (crl_external_validation_enabled=false), an empty CRL distribution-point list was still returning NO_URLS instead of DISABLED, causing signing to be blocked even though the admin intended to bypass validation. Move the toggle check before the empty-URL guard so that an empty list is treated the same as all points being intentionally skipped. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 133906b commit 5326b92

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

lib/Service/Crl/CrlRevocationChecker.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,17 @@ public function validate(array $crlUrls, string $certPem): array {
5454
}
5555

5656
private function validateFromUrlsWithDetails(array $crlUrls, string $certPem): array {
57+
$externalValidationEnabled = $this->appConfig->getValueBool(Application::APP_ID, 'crl_external_validation_enabled', true);
58+
5759
if (empty($crlUrls)) {
60+
// When external validation is disabled, treat an empty distribution-point
61+
// list the same as if all points were intentionally skipped.
62+
if (!$externalValidationEnabled) {
63+
return ['status' => CrlValidationStatus::DISABLED];
64+
}
5865
return ['status' => CrlValidationStatus::NO_URLS];
5966
}
6067

61-
$externalValidationEnabled = $this->appConfig->getValueBool(Application::APP_ID, 'crl_external_validation_enabled', true);
62-
6368
$accessibleUrls = 0;
6469
$disabledUrls = 0;
6570
foreach ($crlUrls as $crlUrl) {

0 commit comments

Comments
 (0)