Skip to content

Commit cea4e45

Browse files
committed
tests: add x509-limbo coverage
This adds x509-limbo coverage using a vendored copy of the limbo.json test data (bzipped to reduce the size from 39mb to 7.3mb). We take a git dev dep on the upstream x509-limbo repo to reuse its harness helpers. By doing this we can catch regressions proactively as part of the development cycle instead of reactively when the upstream x509-limbo project updates published webpki releases. The test rigging is similar to the upstream "rustls-webpki" harness, except that it tests against the expected outcomes per-testcase mod an exceptions JSON file. That exceptions file is pre-populated based on the current divergences listed on the x509-limbo.com website[0]. Some of these divergences may motivate changes in the verifier that will remove the exception, while others (e.g. not honoring EE cert CNs) will always remain due to explicit design choices of this crate. The test is ignored by default, because the runtime is longer than the other tests. With this in place we can also remove the ignored by default bettertls coverage, since that project is included as a subset[1] of the x509-limbo test cases. [0]: https://x509-limbo.com/anomalous-results/rustls-webpki/ [1]: https://x509-limbo.com/testcases/bettertls/
1 parent c36ee95 commit cea4e45

File tree

10 files changed

+924
-361
lines changed

10 files changed

+924
-361
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ untrusted = "0.9"
8383
base64 = "0.22"
8484
bencher = "0.1.5"
8585
bzip2 = "0.6"
86+
chrono = "0.4"
87+
limbo-harness-support = { git = "https://github.com/C2SP/x509-limbo", rev = "9c7359242f16265a5154bc5989eca91822ef5ed2" }
8688
once_cell = "1.17.2"
8789
rcgen = { version = "0.14.2", default-features = false, features = ["aws_lc_rs"] }
8890
rustls-aws-lc-rs = { version = "0.1.0-dev.0" }

deny.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ license-files = [
2424

2525
[bans]
2626
wildcards = "deny"
27+
# Allow git/path dev-dependencies (like limbo-harness-support) without version specs
28+
allow-wildcard-paths = true
2729

2830
[sources]
2931
unknown-registry = "deny"
3032
unknown-git = "deny"
33+
# Allow git source for x509-limbo test harness (dev dependency only)
34+
allow-git = ["https://github.com/C2SP/x509-limbo"]

tests/better_tls.rs

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)