22.11.2018, 07:19
Please update LM to 2018 RC1 firmware, it has MQTT libraries built in and it uses latest version that has some SSL issues fixed.
This library is used in LM: https://github.com/flukso/lua-mosquitto
Before connection is established you need to provide paths to certificate files. You can upload certificates via ftp. Keyfiles cannot have a passphrase.
Only server certificate is used:
Both client and server certificates are used:
This library is used in LM: https://github.com/flukso/lua-mosquitto
Before connection is established you need to provide paths to certificate files. You can upload certificates via ftp. Keyfiles cannot have a passphrase.
Only server certificate is used:
Code:
cafile = '/home/ftp/server.crt'
mclient:tls_set(cafile)
Both client and server certificates are used:
Code:
cafile = '/home/ftp/server.crt'
certfile = '/home/ftp/client.crt'
keyfile = '/home/ftp/client.key'
mclient:tls_set(cafile, nil, certfile, keyfile)