Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd preliminary rustls support #572
+926
−454
Conversation
brson
added some commits
Jul 10, 2016
This comment has been minimized.
This comment has been minimized.
|
cc #568 |
alexcrichton
reviewed
Jul 11, 2016
src/download/src/lib.rs
Outdated
| { | ||
| fn write(&mut self, buf: &[u8]) -> IoResult<usize> { | ||
| self.0.lock() | ||
| .map_err(|_| io::Error::new(io::ErrorKind::Other, NativeSslPoisonError)) |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Jul 11, 2016
Member
The map_err here is kinda repetitive, perhaps it could be refactored?
This comment has been minimized.
This comment has been minimized.
|
Looks pretty good to me, modulo error handling. I'd be somewhat wary of making this too general as in the limit it'd just be recreating something like curl/hyper, as they're in theory the "general abstraction" for downloading crates. |
brson
added some commits
Jul 11, 2016
brson
merged commit ee7dab8
into
rust-lang:master
Jul 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
brson commentedJul 10, 2016
•
edited
Builds on #570.
This doesn't actually work yet, but it makes rustls an optional dependency. If you build with
--feature=rustls-backendthen run withRUSTUP_USE_RUSTLSit will use https://github.com/ctz/rustls with hyper. Next step is to write code to load the system root cert store.At the moment this is using my fork of rustls that adds a concurrency fix.
r? @alexcrichton
cc @ctz @briansmith