This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

MQTT Secure Websocket - FATAL Unknown CA
#16
Hi, do you also know how to conenct to AWS IoT ?
AWS provides:
- the root CA :AmazonRootCA1.pem and AmazonRootCA3.pem
- the client cert : 0a1b2c3d4e-certificate.pem.crt
- the client private key: 0a1b2c3d4e-private.pem.key
- the client public key: 0a1b2c3d4e-public.pem.key

i would assume below is the correct way to connect, i left out login_set because auth is only certificate based

broker = 'random-ats.iot.eu-central-1.amazonaws.com'
client:tls_set('/data/ftp/AmazonRootCA1.pem', nil, '/data/ftp/0a1b2c3d4e-certificate.pem.crt', '/data/ftp/0a1b2c3d4e-private.pem.key')
local ok, rc = client:connect(broker,8883)
assert(ok)

I get this error:
AWS IoT Test 15.06.2020 14:53:44
Resident script:15: Invalid function arguments provided.
stack traceback:
[C]: in function 'tls_set'

What am I doing wrong ?
Reply


Messages In This Thread
RE: MQTT Secure Websocket - FATAL Unknown CA - by ThomasB - 15.06.2020, 13:01

Forum Jump: