Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Treat warnings as errors in zlint tests #22

Open
erikh opened this issue Feb 18, 2022 · 3 comments
Open

Treat warnings as errors in zlint tests #22

erikh opened this issue Feb 18, 2022 · 3 comments
Assignees

Comments

@erikh
Copy link
Contributor

erikh commented Feb 18, 2022

Seems like the right thing to do. This involves both parsing the response and itemizing the warnings and errors as a part of the test failure in a meaningful way.

@erikh
Copy link
Contributor Author

erikh commented Feb 18, 2022

this is going to take some work. Here are the warnings when enabled; you can see these in latest "main" by editing line 335 or so of src/test/mod.rs to match with "fail" or "warn" instead of just "fail" as it is now.

The result is:

---- acme::handlers::order::tests::test_order_flow_single_domain stdout ----
thread 'acme::handlers::order::tests::test_order_flow_single_domain' panicked at '
        expected: result[ok]
         but was: result[error]<ZLint({"w_sub_cert_aia_does_not_contain_issuing_ca_url", "w_ian_iana_pub_suffix_empty"})>
  • Issuer Alternative Names need to be propagated from the CA construction process. This will involve some API changes.
  • I don't think AIA is supported at all right now.

@erikh
Copy link
Contributor Author

erikh commented Feb 18, 2022

Namely, I think the API changes will involve some kind of introspection or passing of arguments to the CA type constructor to pass a url + DNS name into it so it can be propagated as the issuerAltName. Right now it's just copied from the issuer settings (a feature of openssl), which is apparently incorrect best I can tell.

@erikh
Copy link
Contributor Author

erikh commented Feb 18, 2022

Added a ZLINT_WARN so the file doesn't have to be patched. Set it to non-empty in the environment to trigger warnings as errors with zlint.

@erikh erikh self-assigned this Feb 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant