-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update rustls v0.20 -> v0.21 #9
Conversation
36e489c
to
6d613c9
Compare
@complexspaces I think this is ready for an initial review now. I'm happy to make adjustments if any parts are still off the mark. My familiarity with this crate is still very low :-) |
6d613c9
to
0cdc9d2
Compare
Since Rustls restored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks pretty good, my only real concern is how the EKU errors aren't being exactly tested for anymore.
0cdc9d2
to
a029eed
Compare
@complexspaces I think this is ready for another review pass when you have a chance. There's no big rush because we still have a few other dependencies that need to be updated so we can remove the Cargo patches here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one last thing, but otherwise this looks good. Now its just a matter of the rest of the ecosystem catching up :)
a029eed
to
cf59e4b
Compare
cf59e4b
to
dda43b4
Compare
Thanks for the list, that's pretty helpful 👍 |
2389b76
to
00a7677
Compare
Haven't forgotten about this PR :-) Things are moving again and I'm hopeful we'll be able to tie a bow on this in the next week or two. |
No worries at all, I've been following along with the other releases that are leading up to this. |
00a7677
to
11e2987
Compare
@complexspaces All set! 🚀 |
11e2987
to
7917d03
Compare
Update rustls dependency from 0.20.0 to 0.21.0. Also patches transitive deps on rustls-native-certs, webpki-roots, reqwest, hyper-rustls and tokio-rustls to use releases that also depend on rustls 0.21.0. Most notable for this codebase, the `rustls::Error::InvalidCertificateData` has been removed and replaced by `InvalidCertificate` and a number of `CertificateError` sub-variants. Now that the upstream `InvalidCertificate` error offers a way to specify what went wrong with more granularity we're able to trim most of the `error_messages` consts, choosing instead to return the more specific upstream error types. For the case where invalid extensions are detected we define our own type to use for this error case. In all other circumstances where we want to return an `InvalidCertificate` error with some platform specific error message we use the `InvalidCertificate(CertificateError::Other)` variant with the error message, repurposing the `invalid_certificate` helper for constructing an `Arc` over a `Box` with the error message. We also have to take some special care when asserting the equality of errors, handling the case where looking at a `CertificateError::Other` specially, since it can box a dyn error that can't be compared directly without downcasting the error to a concrete type.
7917d03
to
4c8048f
Compare
Thanks again for handling this! |
Description
This branch updates
rustls-platform-verifier
to use the recently released rustls 0.21.0, both as a direct dependency and through upgrades to relevant transitive deps reqwest, hyper-rustls, and tokio-rustls).Details
Most notable for this codebase, the
rustls::Error::InvalidCertificateData
has been removed and replacedby
InvalidCertificate
and a number ofCertificateError
sub-variants.Now that the upstream
InvalidCertificate
error offers a way to specify what went wrong with more granularity we're able to trim all of theerror_messages
consts, choosing instead to return the more specific upstream error types. For the case where invalid extensions are detected we define our own error type to use consistently across verifiers.In all other circumstances where we want to return an
InvalidCertificate
error with some platform specific error message weuse the
InvalidCertificate(CertificateError::Other)
variant with the error message, re-purposing theinvalid_certificate
helper for constructing anArc
over aBox
with the error message.We also have to take some special care when asserting the equality of errors, handling the case where looking at a
CertificateError::Other
specially, since it can box a dyn error that can't be compared directly without downcasting the error to a concrete type.Remaining work