Closed Achelics closed 5 years ago
Hi @Achelics,
use secure = {cafile=..., certificate=..., key=...}
instead of ssl = {...}
scusami io ho letto tutti i tuoi post , puoi inviare per favore un esempio completo di connessione ssl mqtt con certificato verso il broker mosquitto su porta 8883 , ti chiedo questo perche' ai fatto decine di esempi senza mai concludere , grazie
sorry I have read all your posts, can you please send a complete example of ssl mqtt connection with certificate to the broker mosquitto on port 8883, I ask you this because I made dozens of examples without ever concluding, thanks
error info: ./lua: ./mqtt/clent.lua:148: unexpected key in client args: ssl = table: 0x38e418 stack traceback: [C]: in function 'error' ./mqtt/client.lua:148: in method '__init' ./mqtt/client.lua:1165: in function 'mqtt.client.create' (...tail calls...) test_mqtt.lua:5: in main chunk [C]: in ?
my config:
local client = mqtt.client{ -- NOTE: this broker is not working sometimes; comment username = "..." below if you still want to use it -- uri = "test.mosquitto.org", uri = "127.0.0.1:8883", -- NOTE: more about flespi tokens: https://flespi.com/kb/tokens-access-keys-to-flespi-platform -- username = "stPwSVV73Eqw5LSv0iMXbc4EguS7JyuZR9lxU5uLxI5tiNM8ToTVqNpu85pFtJv9", clean = true, ssl ={ cafile = "/home/app/client-key.pem",
certificate = "/home/app/client-cert.pem", key = "/home/app/client-key.pem" }, }
How can I resovle it. Thanks