Topic: Wolf MQTT Harmony 3 and SSL
Hi,
I'm having issues with the Harmony 3 MQTT demo using the PIC32MZ EF Starter Kit and getting SSL to work.
Using port 1883 everything works correctly and I can connect to the broker, however when I change to port 8883 the connection fails as follows,
MQTT pub/sub demo has been started
MQTT Task - Client Start: QoS 0, broker mqtt.eclipseprojects.io
MQTT Task - run message: WMQTT_NETGlue_Initialize, res: 0
MQTT Task - run message: MqttClient_Init, res: 0
MQTT Task - run message: MqttClient_SetDisconnectCallback, res: 0
WMQTT_NET_GLUE Info: Started Connect
WMQTT_NET_GLUE Info: Connected Successfully
WMQTT_NET_GLUE Info: Start TLS
WMQTT_NET_GLUE Error: TLS Negotiation, occurred in func: WMQTT_NETGlue_Connect, line: 328,
MQTT Task - run message: MqttClient_NetConnect, res: -6
MQTT Task - MQTT cycle Failed in state: 6, error code: -6!
I think the demo is running correctly but the certs are wrong for the broker, I have a local mosquitto broker I can use with working certs, however I'm unsure how to convert the X509 format into DER and then to the byte arrays used within the demo.
Do you have a best practice / guide to converting from x509 to a DER byte array?
I noticed in the GIT repo the broker has been updated, but I didn't see the certs being changed, does the harmony 3 demo work with SSL to the eclipseprojects.io broker?
Thanks
Shaun