Fix tls-with-tokio-rustls compilation#46
Conversation
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
|
Hi @utopiabound, I am probably missing something, it's been a while since I looked at this code, but if I try the following I don't seem to have a problem connecting: $ gh pr checkout #46
$ cargo run --example demo --no-default-features --features tls-with-tokio-rustls -- --host google.com --port 443
Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.57s
Running `target/debug/examples/demo --host google.com --port 443`
[00:00:00.005] (7f880d103240) INFO Querying server properties..Would you perhaps be able to help me reproduce the issue? Thanks, Ximon |
|
I don't have a simple reproducer, but without this change both Workaround for my code was to add this call in main(): // Setup ring provider as default provider
_ = tokio_rustls::rustls::crypto::ring::default_provider().install_default(); |
The rustls docs say:
Which seems to say your workaround is actually the right thing to do. I'm not sure that this library should make the choice of either ring or aws_lc_rs for you. |
|
But it's not making the choice it's just not pulling in extra dependencies. The change just matches |
|
The question is why we pull in ring for rustls in the first place. I think we can depend only on tokio-rustls with |
This allows this to compile when used as below:
Otherwise both
ringandaws-lc-rsare included byrustlsand the binary dies with the following: