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

Anthentication PSK (pre shared key) with Mosquitto #283

Closed
ghost opened this issue May 11, 2015 · 3 comments
Closed

Anthentication PSK (pre shared key) with Mosquitto #283

ghost opened this issue May 11, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented May 11, 2015

I am trying to configure a Pre Shared Key encrypted connection between a mosquitto mqtt broker and an application written in Node.js which uses the MQTT client library.

I can't seem to find any samples or documentation that talks about how you'd set this up. Is it possible to authenticate the client with PSK using this library?

Thanks for your help :-)

@mcollina
Copy link
Member

I think so, given that the PSK stuff is just TLS. However I do not know the options for doing it in node.js, a good starting point is https://nodejs.org/api/tls.html#tls_tls_connect_options_callback. You can pass any of those options through the mqtt.connect() method.

If you would like to document that in the examples folder and send a PR, that would be great!

@ghost
Copy link
Author

ghost commented May 12, 2015

Unfortunately after googling I don't think TLS-PSK is implemented by Node.js, because it is recently introduced to Openssl and is not widely supported. There was a PR (https://github.com/joyent/node/pull/1162/files) serveral years ago but was not accepted.

@mcollina
Copy link
Member

mcollina commented Sep 1, 2016

TLS-PSK is not available in Node.js, when that will be added it would be supported in piggyback.

@mcollina mcollina closed this as completed Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant