Skip to content
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

Implement optional support for rustls #568

Open
brson opened this Issue Jul 10, 2016 · 7 comments

Comments

3 participants
@brson
Copy link
Contributor

brson commented Jul 10, 2016

Rustls is a pure-Rust TLS library. Just like today we support either curl or hyper + nativetls, add optional runtime support for hyper + rustls. The openssl dep is one of the most troublesome pieces of native code in Rust. It'll be nice to get rid of it.

This will require adding the dependency to rustup_utils, then modifying rustup_utils::raw::download_file to use hyper + rustls when RUSTUP_USE_RUSTLS environment variable is set. Follow the example of RUSTUP_USE_HYPER.

@brson brson added the help wanted label Jul 10, 2016

@RustPowers

This comment has been minimized.

Copy link

RustPowers commented Jul 10, 2016

For first, need to fix his API. To use an environment variable to support it seems to me superfluous. When rustls stabilizes, you'll be able to remove openssl dependence in the rustup.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jul 10, 2016

I'm doing a bit of work on the API right now to clean it up so each HTTP implementation doesn't have to do deal with writing to file and hashing.

@RustPowers The environment variable is there to test the less mature hyper implementation. I don't expect it to stay around forever.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jul 10, 2016

This PR adds code for a 3rd HTTPS backend, and plugs rustls into hyper. Doesn't work yet. Next step is to write code for loading the system root cert store (this might itself be a useful standalone crate).

@inejge

This comment has been minimized.

Copy link
Contributor

inejge commented Jul 13, 2016

A brief FYI: I've been working on a PoC cross-platform CA cert loading crate, and the results are promising so far: I can enumerate and dump the system CA stores on macOS and Windows in PEM format, and have the code to distinguish between Unix-like systems (which is needed to get at their CA stores.) I'll need another day or two to get everything in shape for integration with rustup.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jul 14, 2016

@inejge omg woo!

@inejge

This comment has been minimized.

Copy link
Contributor

inejge commented Jul 15, 2016

PR opened, CA loading works but rustls connections hang after TLS negotiation, when the first user data is sent/received. (No relation to cert loading, it also happens with hardcoded values.) Will try to investigate further.

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jul 16, 2016

There's a very good chance the read/write code I wrote earlier is wrong since it's never been tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.