eclipse / paho.mqtt.rust

paho.mqtt.rust
Other
525 stars 102 forks source link

Is paho mqtt supports Rustls ? #222

Closed sarath3192 closed 6 months ago

sarath3192 commented 7 months ago

If yes, please provide me the details, thank you in advance.

fpagliughi commented 7 months ago

No. At this time, the Rust library is just a wrapper around the Paho C library. The C library handles the network communications, and it uses OpenSSL.

There is a plan to eventually convert this to 100% Rust, but that work is still seeking funding and may not start for a while.

sarath3192 commented 7 months ago

Thank you for your quick response. I have a use case where I need to use TLS with paho-mqtt, So if I wanted integrated rustls into this project how hard and how much time it will take?

fpagliughi commented 7 months ago

Most of the Paho libraries already support using TLS. There is nothing to add. The Paho C, C++, and Rust libraries all share the base C library, so have identical features for connecting to a broker. Currently they already support TLS, but they use the OpenSSL implementation.

In addition to a straight TLS connection, you can also use WebSockets either unsecure or over TLS.

For s straight TLS connection, see the ssl_publish example in this repo: https://github.com/eclipse/paho.mqtt.rust/blob/master/examples/ssl_publish.rs

fpagliughi commented 6 months ago

I assume the question is answered? If not, feel fee to re-open and expand.