Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wishlist possibility: add generic trait for handling SSL connections, allow non-OpenSSL ssl #129

Open
daboross opened this issue Apr 3, 2017 · 9 comments

Comments

@daboross
Copy link

daboross commented Apr 3, 2017

If something similar to the changes described in hyperium/hyper#985 could be implemented, that would be awesome.

Ideally I'm look to use ws-rs with rustls rather than rust-openssl. Even though it's less vetted than OpenSSL and not really a good default yet, it would make building a secure websocket client on Windows much easier.

What would you think of adding SslClient and Connector traits similar to hyper's SslClient and NetworkConnector - would making WebSocket generic over such a trait be acceptable / reasonable to implement?

@daboross
Copy link
Author

daboross commented Apr 4, 2017

My use case would only be for websocket clients, but I guess if this is implemented, it'd probably be best to allow for both clients and servers.

@housleyjk
Copy link
Owner

Using traits to allow customization is something I'm planning on doing in the upcoming refactor. So, I can't say yes to everything you are asking for, but I will do my best.

@daboross
Copy link
Author

daboross commented Apr 4, 2017

Ok, thank you!

@daboross
Copy link
Author

If a generic solution doesn't end up being viable, what would you think of potentially switching to rust-native-tls?

It's an abstraction that would still be using OpenSSL on linux, and then the native counterparts on windows and mac. I don't think it would be ideal for my use case, but it would be alright - and this would definitely make compiling to windows simpler.

@download13
Copy link

This is a blocking issue for me using this library. I like it's style a lot more than the main rust websocket lib, but I can't debug my program on windows as this won't compile.

@dbrgn
Copy link

dbrgn commented Jan 4, 2018

I'd also +1 on rust-native-tls. Besides the advantages mentioned above it also seems to have a nicer API.

@dbrgn
Copy link

dbrgn commented Jan 4, 2018

Another issue is building for iOS. It requires a static build of OpenSSL which is cumbersome.

If I read this correctly, native_tls uses security framework on iOS instead of OpenSSL.

@dbrgn
Copy link

dbrgn commented Jan 8, 2018

Sorry for the triple-post :) I'm not sure how much work it would be and I don't have much experience with TLS, but would you be willing to accept a pull request that exchanges openssl with native_tls?

@steveklabnik
Copy link

native-tls support was added in #218

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

No branches or pull requests

5 participants