Open daboross opened 7 years ago
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.
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.
Ok, thank you!
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.
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.
I'd also +1 on rust-native-tls. Besides the advantages mentioned above it also seems to have a nicer API.
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.
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
?
native-tls support was added in https://github.com/housleyjk/ws-rs/pull/218
If something similar to the changes described in https://github.com/hyperium/hyper/issues/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
andConnector
traits similar to hyper'sSslClient
andNetworkConnector
- would making WebSocket generic over such a trait be acceptable / reasonable to implement?