arduino-libraries / ArduinoMqttClient

ArduinoMqttClient Library for Arduino
GNU Lesser General Public License v2.1
186 stars 73 forks source link

[Question] TLS PSK Authentication #75

Open nolwad opened 2 years ago

nolwad commented 2 years ago

Is this library compatible with PSK Authentication? The MQTT server that my company has is set up for PSK based authentication and encryption and as such, I believe it doesn't use a root certificate, but rather a psk identity and key to be passed in when connecting as a client. As an example, when connecting from the terminal I'd put in this command to subscribe:

mosquitto_sub -h 160.36.60.20 -t 'test' -u username -P password -p 8883 --psk-identity user --psk 123456789

It works fine, but with the Arduino I can't input the psk information. Is there a way to do it with this library, or does psk need to be on the Arduino's crypto chip itself?

nolwad commented 2 years ago

The code must be sending the server IP, topic, username, password, and port. Is there a way I can force my code to send my psk information along with it?