Skip to content

Commit f9e9186

Browse files
committed
Flip the external cases to expect failure
Path building would succeed but CRL parsing would fail. We can't distinguish between thes failures yet, so work around it.
1 parent 381fb60 commit f9e9186

8 files changed

Lines changed: 1218 additions & 1218 deletions

File tree

limbo.json

Lines changed: 1202 additions & 1202 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

limbo/_assets/crl/bad_version.crl

-18 Bytes
Binary file not shown.

limbo/_assets/crl/bad_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SEQUENCE {
1717
UTCTime { "250130060000Z" }
1818
SEQUENCE {
1919
SEQUENCE {
20-
INTEGER { `258c6cc5ce5072af167f7df02a85506ca358a4a4` }
20+
INTEGER { 1 }
2121
UTCTime { "250102060000Z" }
2222
}
2323
}
-20 Bytes
Binary file not shown.

limbo/_assets/crl/generalized_time_2025.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SEQUENCE {
1717
GeneralizedTime { "20250130060000Z" }
1818
SEQUENCE {
1919
SEQUENCE {
20-
INTEGER { `258c6cc5ce5072af167f7df02a85506ca358a4a4` }
20+
INTEGER { 1 }
2121
UTCTime { "250102060000Z" }
2222
}
2323
}
-17 Bytes
Binary file not shown.

limbo/_assets/crl/missing_next_update.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SEQUENCE {
1616
UTCTime { "250101060000Z" }
1717
SEQUENCE {
1818
SEQUENCE {
19-
INTEGER { `258c6cc5ce5072af167f7df02a85506ca358a4a4` }
19+
INTEGER { 1 }
2020
UTCTime { "250102060000Z" }
2121
}
2222
}

limbo/testcases/crl/external.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,36 @@ def crl_invalid_version(builder: Builder) -> None:
3030
"""
3131
Tests a Certificate Revocation List (CRL) with an invalid version.
3232
33-
Encapsulates a simple test case where a certificate has been revoked by the CA
34-
through a malformed CRL with an invalid `version` field. The CA certificate
35-
and CRL are provided, and the leaf certificate is expected to be accepted as
36-
the CRL is invalid.
33+
The CRL revokes an arbitrary certificate but has an invalid `version` field.
34+
The leaf certificate should be rejected because the CRL is invalid and cannot
35+
establish the leaf's revocation status.
3736
"""
3837

39-
_external_crl_testcase(builder, "bad_version").succeeds()
38+
_external_crl_testcase(builder, "bad_version").fails()
4039

4140

4241
@testcase
4342
def crl_update_generalizedtime_2025(builder: Builder) -> None:
4443
"""
4544
Tests a Certificate Revocation List (CRL) with invalid (re)issue date encodings.
4645
47-
The CRL includes `This Update` and `Next Update` fields encoding dates in the year
48-
2025 as `GeneralizedTime`. This is forbidden per RFC 5280 5.2.1.4 and 5.2.1.5, thus
49-
the leaf certificate that the CRL revokes should be accepted.
46+
The CRL revokes an arbitrary certificate but includes `thisUpdate` and
47+
`nextUpdate` fields encoding dates in the year 2025 as `GeneralizedTime`.
48+
This is forbidden per RFC 5280 5.2.1.4 and 5.2.1.5; path building should fail
49+
because the CRL is invalid and cannot establish the leaf's revocation status.
5050
"""
5151

52-
_external_crl_testcase(builder, "generalized_time_2025").succeeds()
52+
_external_crl_testcase(builder, "generalized_time_2025").fails()
5353

5454

5555
@testcase
5656
def crl_missing_next_update(builder: Builder) -> None:
5757
"""
5858
Tests a Certificate Revocation List (CRL) missing the nextUpdate field.
5959
60-
The CRL revokes the leaf certificate but omits `nextUpdate`. This is forbidden
61-
per RFC 5280 5.1.2.5, thus the leaf certificate should be accepted as the CRL
62-
is invalid.
60+
The CRL revokes an arbitrary certificate but omits `nextUpdate`. This is
61+
forbidden per RFC 5280 5.1.2.5, so the leaf certificate should be rejected
62+
because the CRL is invalid and cannot establish the leaf's revocation status.
6363
"""
6464

65-
_external_crl_testcase(builder, "missing_next_update").succeeds()
65+
_external_crl_testcase(builder, "missing_next_update").fails()

0 commit comments

Comments
 (0)