housleyjk / ws-rs

Lightweight, event-driven WebSockets for Rust.
MIT License
1.47k stars 222 forks source link

Example of unsafe ssl client with native-tls #306

Open EverlastingBugstopper opened 4 years ago

EverlastingBugstopper commented 4 years ago

With the closing of #202 came support for native-tls. This is great because my use case requires cross-platform builds and native-tls fits that requirement very nicely.

Unfortunately I'm having a rough time migrating this example to using native-tls.

I've been able to get it to build, but when I run the process, I get this error:

[2019-12-17T21:55:22Z ERROR ws::handler] WS Error <Internal>: Failed to upgrade client to SSL: the handshake process was interrupted

The relevant diff can be found here.

If I get this working I would love to submit a PR that adds this example to the docs!

Thanks so much for your help on this 😄

EverlastingBugstopper commented 4 years ago

@wiomoc or @housleyjk do either of you have some time to help with this?

wiomoc commented 4 years ago

I remember having some issues on macOS back then, for that reason I created https://github.com/kornelski/rust-security-framework/pull/63. I seams like that change didn't made the way into ws-rs yet, so try updating native-ssl