Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

hyper 0.11? #1

Open
mssun opened this issue Sep 19, 2017 · 10 comments
Open

hyper 0.11? #1

mssun opened this issue Sep 19, 2017 · 10 comments
Assignees

Comments

@mssun
Copy link

mssun commented Sep 19, 2017

Compared to 0.9, I guess hyper dropped openssl dependency and made it a pure rust library.

I wonder when snatch will move on to hyper 0.11 and give an option to decide whether to use openssl. OpenSSL can potentially introduce security issue.

This will give users an option to use pure Rust binary.

Same issue in snatch: derniercri/snatch#76

@k0pernicus k0pernicus self-assigned this Sep 19, 2017
@k0pernicus
Copy link
Owner

I began to update hyper in Zou, and it's more complicated than I thought (the use of Tokio makes the API more complex actually...).
It may take a while - sorry for the delay.

@mssun
Copy link
Author

mssun commented Sep 26, 2017

Thanks for the update @k0pernicus . Take your time. I'm still looking forward to see a better Zou.

BTW, the TLS version of hyper is provided by:

@k0pernicus
Copy link
Owner

k0pernicus commented Sep 26, 2017

Yep, I am using it ;-)
No troubles with the HttpsConnector, just the Futures API that is... pretty complex to use

@k0pernicus
Copy link
Owner

k0pernicus commented Sep 27, 2017

So, after a night hacking with the 0.11 version of hyper, I think it's not relevant to migrate to this version currently.
The 0.11 version deals with tokio in order to perform well async I/O - no blocking I/O in this version. We should see a difference in retrieving data, but I really think that it may be annoying to update now Zou as an async tool.

But, I will update the 0.9 version of hyper to the 0.10 one, which can resolve the version incompatibilities of OpenSSL ;-)

@k0pernicus
Copy link
Owner

k0pernicus commented Sep 27, 2017

This is the current state of the hyper-v0.10 branch:

  • upgrading hyper v0.9 -> v0.10
  • HTTP client (default)
  • HTTPS client using hyper-openssl if the user is asking for an SSL connection.

The code is ugly, but the current process works, so I am updating the code.
I will work also on user-friendly Exception errors.

screen shot 2017-09-27 at 14 00 09

@k0pernicus
Copy link
Owner

Update: the branch has been merged with devel ;-)

@mssun
Copy link
Author

mssun commented Sep 28, 2017

Thanks for the update.

I'm studying crypto/TLS library in Rust recently. I found that hyper-rustls could be a better option. The main reason is that it is based on rustls for TLS and ring for crypto. By using this crypto library chain, we can forget openssl. Using ring as the core crypto library has several advantages:

  1. a (towards-pure) Rust library makes it more secure and safe, although it still has C code (from BoringSSL), they are working towards the safer direction IMO.
  2. no longer need openssl library as a dependency

Refer:

@k0pernicus
Copy link
Owner

k0pernicus commented Sep 29, 2017

Ok - I will explore the issue as soon as the code has been updated :-)
Thanks for those awesome proposal!

@mssun
Copy link
Author

mssun commented Sep 29, 2017

HTTPS client using hyper-openssl if the user is asking for an SSL connection.

Another question is about using hyper-openssl, I guess hyper-tls is the official supported TLS (openssl) based hyper. Is there any specific reason choosing hyper-openssl?

Basically, there are two choices: hyper-tls vs hyper-rustls, i.e., openssl vs ring. I personally prefer to ring because of previous reasons.

@k0pernicus
Copy link
Owner

You are right, hyper-tls is the official crate to support TLS (openssl) using hyper.
But, hyper-tls is supported by hyper only since the 0.11 version - not the 0.10 one.

To support TLS for 0.10, the must efficient (efficient = quick and reliable) way is to use hyper-openssl for now.
As soon as I updated hyper, I will update too the crate to support TLS ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants