tokio-rs / tls

A collection of Tokio based TLS libraries.
https://tokio.rs
MIT License
253 stars 86 forks source link

update rustls v0.20.7 -> v0.21.0 #137

Closed cpu closed 1 year ago

cpu commented 1 year ago

Description

This branch updates tokio-rustls to use the freshly released Rustls 0.21.0 release tag.

deps: update to rustls 0.21.0.

This commit updates tokio-rustls to use the freshly released Rustls 0.21.0 release tag, and the rustls-webpki fork of webpki.

tests: improve server wait in early data test.

Previously the test_0rtt test had a hardcoded 1s sleep waiting for an openssl s_server process to become ready.

If 1s waiting wasn't long enough, the test could fail with an error like:

Error: Os { code: 10061, kind: ConnectionRefused, message: "No connection could be made because the target machine actively refused it." }

This commit replaces the hardcoded sleep with a sleep loop that gradually increases the delay time up to a fixed maximum. This makes the test run faster when the server is ready quickly and prevents an error if it takes longer than 1s to stabilize.

version: 0.23.4 -> 0.24.0

This commit bumps the tokio-rustls version from 0.23.4 to 0.24.0

paolobarbolini commented 1 year ago

0.21.0 has just been released

cpu commented 1 year ago

Thanks, will update shortly.

cpu commented 1 year ago

Thanks, will update shortly.

I've updated this branch to use the released 0.21.0 Rustls tag. It still includes https://github.com/tokio-rs/tls/pull/133, so I think it would be prudent to have that work merged first and I can rebase afterwards.

djc commented 1 year ago

Want to add a commit that bumps the version?

cpu commented 1 year ago

Want to add a commit that bumps the version?

Done: f82c14e

zh-jq commented 1 year ago

Replace the webpki dependency with rustls-webpki?

quininer commented 1 year ago

I think we should remove dependencies and features reexport.

cpu commented 1 year ago

Replace the webpki dependency with rustls-webpki?

:+1: Done.

I think we should remove dependencies and features reexport.

@quininer I think the features that are re-exported from rustls are probably useful for consumers. Perhaps we could discuss this change separately from the update if its something you could describe in more detail in a separate issue?

cpu commented 1 year ago

I added another commit (642bba3) to this branch to fix a flaky test I noticed failed after updating the webpki crate to the rustls fork.

cpu commented 1 year ago

cpu force-pushed the cpu-rustls-0.21.0-prep branch from 642bba3 to f82c14e

Rebased to remove the commit touching the security-framework dep now that https://github.com/tokio-rs/tls/pull/133 landed.

quininer commented 1 year ago

It is not hard for users to import rustls themselves, I think it is not very useful and error-prone to maintain it downstream.

It's good to merge this MR in this way, and we can discuss it in other MRs.

bartlomieju commented 1 year ago

Hey folks, thanks for quick turn around on this upgrade. When can we expect a new version be published to crates.io?

djc commented 1 year ago

@bartlomieju in the next few days, probably.

cpu commented 1 year ago

@bartlomieju It looks like 0.24.0 is available in crates.io now.