Skip to content

Commit 3d84052

Browse files
committed
chore: test if crl exists
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent e0a4c97 commit 3d84052

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/php/Unit/Handler/CertificateEngine/OpenSslHandlerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ public function testGenerateCrlDerWithRevokedCertificates(array $certificates):
428428
$this->assertEquals($crlNumber, $actualCrlNumber, 'CRL Number should match the provided value');
429429

430430
foreach ($serialNumbers as $serialNumber) {
431-
$this->assertStringContainsStringIgnoringCase($serialNumber, $crlText, "Serial number $serialNumber should appear in CRL");
431+
$normalizedSerial = ltrim(strtoupper($serialNumber), '0') ?: '0';
432+
$this->assertStringContainsString($normalizedSerial, $crlText, "Serial number $serialNumber (normalized: $normalizedSerial) should appear in CRL");
432433
}
433434
}
434435

0 commit comments

Comments
 (0)