Skip to content

Commit ffd88c8

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 c1117ce commit ffd88c8

8 files changed

Lines changed: 1214 additions & 1214 deletions

File tree

limbo.json

Lines changed: 1198 additions & 1198 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
@@ -29,36 +29,36 @@ def crl_invalid_version(builder: Builder) -> None:
2929
"""
3030
Tests a Certificate Revocation List (CRL) with an invalid version.
3131
32-
Encapsulates a simple test case where a certificate has been revoked by the CA
33-
through a malformed CRL with an invalid `version` field. The CA certificate
34-
and CRL are provided, and the leaf certificate is expected to be accepted as
35-
the CRL is invalid.
32+
The CRL revokes an arbitrary certificate but has an invalid `version` field.
33+
The leaf certificate should be rejected because the CRL is invalid and cannot
34+
establish the leaf's revocation status.
3635
"""
3736

38-
_external_crl_testcase(builder, "bad_version").succeeds()
37+
_external_crl_testcase(builder, "bad_version").fails()
3938

4039

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

51-
_external_crl_testcase(builder, "generalized_time_2025").succeeds()
51+
_external_crl_testcase(builder, "generalized_time_2025").fails()
5252

5353

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

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

0 commit comments

Comments
 (0)