Skip to content

Commit 94decce

Browse files
committed
test: add RFC-focused CRL distribution point scenarios
Signed-off-by: Vitor Mattos <[email protected]>
1 parent 181e579 commit 94decce

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

tests/php/Unit/Service/Crl/CrlDistributionPointsExtractorTest.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,38 @@ public static function crlDistributionPointExtractionProvider(): array {
6868
'ldap://ldap.example.org/cn=RootCA,dc=example,dc=org?certificateRevocationList;binary',
6969
],
7070
],
71+
'rfc-structure-with-reasons-and-crl-issuer' => [
72+
[
73+
'2.5.29.31' => "Full Name:\n URI:http://crl.example.org/root.crl\nReasons: keyCompromise, cACompromise\nCRL Issuer:\n DirName:/C=BR/O=Example/CN=Example CRL Issuer",
74+
],
75+
true,
76+
['http://crl.example.org/root.crl'],
77+
],
78+
'extension-name-is-trimmed-and-case-insensitive' => [
79+
[
80+
' X509V3 CRL Distribution Points ' => "Full Name:\n URI:https://example.org/crl/mixed-case.crl",
81+
],
82+
true,
83+
['https://example.org/crl/mixed-case.crl'],
84+
],
85+
'uri-token-is-case-insensitive' => [
86+
[
87+
'2.5.29.31' => "Full Name:\nuri:ldap://ldap.example.net/cn=CA,dc=example,dc=net?certificateRevocationList;binary",
88+
],
89+
true,
90+
['ldap://ldap.example.net/cn=CA,dc=example,dc=net?certificateRevocationList;binary'],
91+
],
92+
'multiple-supported-extension-keys-are-merged-and-deduplicated' => [
93+
[
94+
'2.5.29.31' => "Full Name:\nURI:https://example.org/crl/shared.crl",
95+
'crlDistributionPoints' => "Full Name:\nURI:https://example.org/crl/shared.crl\nURI:https://example.org/crl/extra.crl",
96+
],
97+
true,
98+
[
99+
'https://example.org/crl/shared.crl',
100+
'https://example.org/crl/extra.crl',
101+
],
102+
],
71103
'array-extension-value-and-duplicates' => [
72104
[
73105
'2.5.29.31' => [

0 commit comments

Comments
 (0)