update rustls dependency and make edits to support its api changes #3225
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.
The rustls crate made some significant changes to its api in v0.23.0, as summarized in the release notes. This pull request bumps the versions of the rustls, rustls-pemfile, and webpki-roots crates, and makes a number of changes needed in response to the aforementioned api changes.
There is, unfortunately, an important drawback to consider. The v0.23.0 release introduced process-wide selection of crypto providers, which requires either that A) we make a breaking api change that requires users to pass in a CryptoProvider when creating a ClientConnection or that B) the user calls CryptoProvider::install_default() exactly once. This pull request does not implement option A, nor does it include the documentation necessary for users to make option B work. I'm interested in adding the documentation for B and maybe trying to figure out some way of putting A behind a feature gate if desired, but I wanted to get feedback first.