rumqtt
rumqtt copied to clipboard
Add support for `native-tls` when using websocket transport
This PR adds support for native-tls
when using Transport::Wss
.
This is still a WIP since the feature tokio-native-tls
needs to be set in async-tungstenite
when using use-native-tls
feature in this crate. At the same time, if use-rustls
is set in this crate, async-tungstenite
needs to set feature tokio-rustls-native-certs
. I have no idea how to edit Cargo.toml
to support both of these cases.
At the moment async-tungstenite
always uses - even if using insecure WS connection - tokio-rustls-native-certs
feature, which I don't think is correct either.
Any help with this or other things I've missed in this PR would be appreciated.
Type of change
New feature (non-breaking change which adds functionality)
Checklist:
- [x] Formatted with
cargo fmt
- [ ] Make an entry to
CHANGELOG.md
if it's relevant to the users of the library. If it's not relevant mention why.