alexcrichton / curl-rust

Rust bindings to libcurl
MIT License
1.02k stars 233 forks source link

Add experimental support for rustls #374

Closed sagebind closed 2 years ago

sagebind commented 3 years ago

This adds experimental support for using rustls as a TLS backend for curl. This is made possible by the upstream rustls support recently added to curl via rustls-ffi.

See #341.

alexcrichton commented 3 years ago

Nice! This seems reasonable to me to add!

I think it's fine to have off-by-default features which may be buggy if turned on, we can just make sure they're properly documented.

sagebind commented 3 years ago

Status update: crustls now supports being built as an rlib dependency which means it can be used as a direct dependency to curl-sys. Crustls will not be published to Crates.io until its official home is found first, which is being discussed in https://github.com/ctz/rustls/issues/671. It is likely that it will be published to Crates.io under the rustls-ffi name. Once that is done then this PR will be mergeable for people to start experimenting with.

jsha commented 2 years ago

rustls-ffi is now published: https://crates.io/crates/rustls-ffi. Thanks for your patience!

sagebind commented 2 years ago

Awesome, thanks @jsha! Now the only thing we have to wait for is curl 7.81 to release with support for the published rustls-ffi versions (0.8+), as curl 7.80 seems to only support rustls-ffi 0.7.

sagebind commented 2 years ago

Looks like curl 7.81.0 is slated to be released 2022-01-05: https://curl.se/dev/release-notes.html

sagebind commented 2 years ago

Curl 7.81.0 was released today as scheduled, and since we've updated to that version on the main branch just hours ago, this feature is now ready to go and mergeable!

alexcrichton commented 2 years ago

Nice!

jsha commented 2 years ago

hooray! thanks for working on this!