GithubHelp home page GithubHelp logo

Comments (3)

whitetiger21022014 avatar whitetiger21022014 commented on June 15, 2024

Hello,
In function luasocket_ssl.connect(conn)
if insert for dump conn.ssl_params, I can't see value for custom: cafile, certificate, key
for k, v in pairs(conn.ssl_params) do
print(k,v)
end

When I insert manual for testing as below, it works as expected

conn.ssl_params["cafile"] = "certs/device/cacert.pem"
conn.ssl_params["certificate"] = "/certs/device/clientcert.pem"
conn.ssl_params["key"] = "/certs/device/clientkey.pem"

from luamqtt.

xHasKx avatar xHasKx commented on June 15, 2024

John,
Thanks for error reporting, will fix it in next release.

According ssl params - you may pass it in ssl = { ... } instead of ssl = true when constructing your MQTT client instance like this:

client = mqtt.client{
	debug = client_debug,
	uri = "x.x.x.x:8883",
	auth = {username = "mqtt_user", password = "123456" },
	clean = true,
	ssl ={	cafile = "/certs/device/cacert.pem",	
			       certificate = "/certs/device/clientcert.pem",
			       key = "/certs/device/clientkey.pem" },
	},
}

from luamqtt.

xHasKx avatar xHasKx commented on June 15, 2024

lua: /usr/lib/lua/mqtt/luasocket_ssl.lua:30: attempt to concatenate local 'err' (a nil value)
stack traceback:
/usr/lib/lua/mqtt/luasocket_ssl.lua:30: in function 'connect'
/usr/lib/lua/mqtt/init.lua:411: in function '_open_connection'
/usr/lib/lua/mqtt/init.lua:305: in function 'connect'

Fixed in version v2.0.0

from luamqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.