Add additional test cases sourced from x509test (experimental) #255
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds 90 additional test cases generated from the google/x509test test corpus. The process for that conversion is over on ctz/webpki-x509test.
This PR doesn't include test cases that unexpectedly failed, I will file an issue to discuss those.
Briefly, the structure of x509test is:
ok-
) and some expected to fail (prefixedxf-
).This naming is maintained into the generated code, so doing
cargo test test_xf_v1_extensions
runs this. The test inputs in x509test have the RFC clause they relate to embedded in the certificate subject. These test names get mapped to expected webpki errors over here -- in this case we don't support v1 so we expect that test case to produceError::UnsupportedCertVersion
.There's a lot of commonality to the test cases; currently the generated rust code is very longwinded. I won't do much more polishing on this though until/unless this seems to be a good avenue for improving testing. This might be a good basis for #248 perhaps.