File tree Expand file tree Collapse file tree
lib/Service/IdentifyMethod/SignatureMethod
tests/php/Unit/Service/IdentifyMethod Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ private function validateCertificateRevocation(array $certificateData): void {
5959 if ($ status === CrlValidationStatus::DISABLED ) {
6060 return ;
6161 }
62+ // Backward compatibility for legacy certificates issued before CRL metadata existed.
63+ if ($ status === CrlValidationStatus::MISSING ) {
64+ $ this ->identifyService ->getLogger ()->warning ('Signing allowed for certificate without revocation metadata ' , [
65+ 'status ' => $ status ->value ,
66+ 'signer_uid ' => $ this ->userSession ->getUser ()?->getUID(),
67+ ]);
68+ return ;
69+ }
6270 $ this ->logRevocationBlockedSigning ($ status );
6371 throw new LibresignException ($ this ->getRevocationErrorMessage ($ status ), 422 );
6472 }
Original file line number Diff line number Diff line change @@ -290,8 +290,7 @@ public static function providerValidateToSignWithCertificateData(): array {
290290 'validTo_time_t ' => $ futureTimestamp ,
291291 'crl_validation ' => CrlValidationStatus::MISSING ,
292292 ],
293- 'shouldThrow ' => true ,
294- 'expectedCode ' => 422 ,
293+ 'shouldThrow ' => false ,
295294 ],
296295 'revoked and expired certificate ' => [
297296 'certificateData ' => [
@@ -306,8 +305,7 @@ public static function providerValidateToSignWithCertificateData(): array {
306305 'validTo_time_t ' => $ futureTimestamp ,
307306 'crl_validation ' => CrlValidationStatus::MISSING ,
308307 ],
309- 'shouldThrow ' => true ,
310- 'expectedCode ' => 422 ,
308+ 'shouldThrow ' => false ,
311309 ],
312310 'valid certificate - old date but valid (1970s timestamp) ' => [
313311 'certificateData ' => [
You can’t perform that action at this time.
0 commit comments