Code: Select all
c = MQTTClient(client_id = "umqtt_client", server = "test.mosquitto.org", port = 8883, ssl = True, ssl_params={"cert_reqs":ssl.CERT_REQUIRED, "ca_certs":"/flash/cert/ca.pem"})
c.connect()
b''
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/flash/lib/umqtt.py", line 66, in connect
IndexError: index out of range
Please find attached archive with CA certificate in .crt, .der and .pem format.
I tried to flash all of them as "/cert/ca.pem", behaviour is always the same.
According to this thread DER format should be used: http://forum.micropython.org/viewtopic.php?f=11&t=1089
I also tested these certificates with MQTT.fx (protocol set to TLSv1) - all of them worked ok.