Skip to content

Commit

Permalink
remove reqwest unit tests, dev-dependency
Browse files Browse the repository at this point in the history
Previously the `verification` mod had a unit test,
`can_verify_server_cert`, that ensured using the platform verifier with
`reqwest` could be done without error.

The reason for this was that the `reqwest` API consumes custom
verifiers to use with a Rustls client config as `&dyn Any` inputs, and
then downcasts at runtime to the required `Arc<dyn ServerCertVerifier>`
- this means that if `rustls-platform-verifier` uses a different Rustls
version than `reqwest` a runtime panic would occur.

However, having this unit test in place means we can't update
`rustls-platform-verifier` to a new Rustls release until the `reqwest`
ecosystem first updates. This is suboptimal, as `reqwest` itself has
many dependencies that need similar updates.

This commit removes the unit test. Ensuring the Rustls versions match
should be handled by downstream consumers that have chosen to use
`reqwest`. There are other libraries one might use
`rustls-platform-verifier` with, and we shouldn't block useful updates
to this crate on `reqwest`. In general one already has to be careful
about mixing/matching Rustls versions across dependencies, the fact that
`reqwest` makes this a runtime concern is unfortunate, but not a great
reason to avoid keeping this crate in sync with the rest of the Rustls
ecosystem.
  • Loading branch information
cpu authored and complexspaces committed Dec 21, 2023
1 parent e419417 commit 0479b6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 622 deletions.
Loading

0 comments on commit 0479b6e

Please sign in to comment.