Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHyper sync rustls 0.6.1 #17938
Hyper sync rustls 0.6.1 #17938
Conversation
highfive
commented
Aug 1, 2017
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon. |
highfive
commented
Aug 1, 2017
highfive
commented
Aug 1, 2017
| @@ -36,6 +36,8 @@ packages = [ | |||
| "error-chain", | |||
| "bitflags", | |||
| "libloading", # Conflicting version is only used at build-time by geckolib. | |||
| "base64", # Conflicting version is used for ring | |||
| "rayon", # Conflicting verswon is used for rustls | |||
This comment has been minimized.
This comment has been minimized.
| pub fn create_ssl_client(ca_file: &PathBuf) -> TlsClient { | ||
| let mut ca = { | ||
| let f = fs::File::open(ca_file).unwrap(); | ||
| let rd = io::BufReader::new(f); |
This comment has been minimized.
This comment has been minimized.
avadacatavra
Aug 2, 2017
Contributor
you should be able to change this to just
io::BufReader::new(f)
and omit the semicolon on this line, the rd, and the end of the nested scope
This comment has been minimized.
This comment has been minimized.
KiChjang
Aug 2, 2017
Member
Additionally, do we want to unwrap here? The old code uses expect() instead of unwrap().
| let mut tls = rustls::ClientConfig::new(); | ||
| tls.root_store.add_pem_file(&mut ca).unwrap(); | ||
| let tls = Arc::new(tls); | ||
| let client = TlsClient { cfg: tls }; |
This comment has been minimized.
This comment has been minimized.
avadacatavra
Aug 2, 2017
Contributor
TlsClient { cfg: Arc::new(tls) }
Rust automatically returns the last expression of a function: https://rustbyexample.com/fn.html
|
This also needs to be squashed into one commit -- we can go over that tomorrow http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html |
f8f4a2d
to
e28cf76
|
All changes have been made and are ready for review. |
|
The squash is good--I would clean up the commit comments to be more succinct. Currently they restate the same thing multiple times |
| @@ -1,32 +1,31 @@ | |||
| /* This Source Code Form is subject to the terms of the Mozilla Public | |||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | |||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |||
|
|
|||
This comment has been minimized.
This comment has been minimized.
| let ssl_connector = ssl_connector_builder.build(); | ||
| OpensslClient::from(ssl_connector) | ||
| pub fn create_ssl_client(ca_file: &PathBuf) -> TlsClient { | ||
| let mut ca = { |
This comment has been minimized.
This comment has been minimized.
avadacatavra
Aug 3, 2017
Contributor
let mut ca = { let f = fs::File::open(ca_file).expect("cannot open CA file"); io::BufReader::new(f) }
| @@ -5,15 +5,14 @@ | |||
| #![deny(unsafe_code)] | |||
| #![feature(box_syntax)] | |||
| #![feature(iterator_step_by)] | |||
|
|
|||
This comment has been minimized.
This comment has been minimized.
e28cf76
to
ad07861
|
Changes have been made. Ready for review. |
|
|
Hyper sync rustls 0.6.1 <!-- Please describe your changes on the following line: --> This change removes Hyper-OpenSSL and integrates HyperSyncRustls v 0.6.1 with servo. It also removes ciphers depending on DHE and SHA1 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17938) <!-- Reviewable:end -->
|
|
WPT tests worked, so that's good. The android build appears to break while building |
|
@jdm my suspicion is that we'll need to specify android to ring in the build command based on https://github.com/briansmith/ring/blob/master/build.rs#L613 |
|
The target is provided automatically since we're invoking Cargo with --target, and the C commands have android-specific include directories appended to them:
|
|
https://github.com/briansmith/ring/blob/5f8d332ed0f38415ee003712d1bb93647ed34afe/build.rs#L560 is the line that is adding the include directory that contains the standard library headers that clang does not like:
|
Removed OpenSSL imports Using Hyper-Sync-Rustls instead of Rust-OpenSSL Servo integrated with HyperSyncRustls- v 0.6.1 Making Formatting changes after review
ad07861
to
31133c0
|
The android issue is still in progress, Other issues have been resolved. Ready for review. |
|
|
|
Apparently if we pass But I'm not sure, since the warning doesn't actually mention Werror. |
|
@Manishearth What should go away? |
|
Oh. The GCC extension warning. |
|
|
|
I'm going to close this until I have more time to bring it up to date :) |
SimranGujral commentedAug 1, 2017
•
edited
This change removes Hyper-OpenSSL and integrates HyperSyncRustls v 0.6.1 with servo.
It also removes ciphers depending on DHE and SHA1
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is