Hello,
I am trying to run the FREE RTOS + MQTT Basic TLS Demo, However, after running the solution after following the steps given at https://www.freertos.org/mqtt/preconfiguredexamplesTLS.html..with the default certificate definition in “mqtt_demo_profile.h” . I get the following errors…
12 1877 [MQTTDemo] [ERROR][NET][1877] Failed to perform TLS handshake, error -9984.
13 1878 [MQTTDemo] [ERROR][MQTT][1878] Failed to create network connection: 1
14 1878 [MQTTDemo] [ERROR][MQTT][1878] Failed to establish new MQTT connection, error NETWORK ERROR
When I tried to download the certificate via the link given at test.mosquitto .org, and copy pasted it in a similar format, I got the errors…
12 1663 [MQTTDemo] [ERROR][NET][1663] Failed to parse server root CA certificate, error -4396.
13 1664 [MQTTDemo] [ERROR][MQTT][1664] Failed to create network connection: 4
14 1664 [MQTTDemo] [ERROR][MQTT][1664] Failed to establish new MQTT connection, error NETWORK ERROR.
I get the same error as above when I try out some other mqtt rocker such as maqiatto or flespi and using their certificates.
I have already turned off my anti virus firewall, as well as added inbound rules in the advanced windows firewall. In both cases I also get the following log:
I am sorry since I am a new user on this forum, I am not allowed to upload files…here is how the format of the certificate…
#define mqttdemoprofileCLIENT_IDENTIFIER "mqttexampleclient"
/**
* @brief The server certificate for test.mosquitto. org:8883.
*
* This certificate is obtained from https://test.mosquitto.org/ and is used
* to authenticate the Mosquitto MQTT broker. This demo only authenticates
* the server and does not authenticate the client. This is a RSA SHA-1
* certificate which is not considered secure for production use cases as
* per the industry standards.
*
* If you want to connect to any other MQTT broker other than
* test.mosquitto.org, replace it with the certificate of the MQTT broker.
*/
#define mqttdemoprofileBROKER_CERTIFICATE_PEM \
"-----BEGIN CERTIFICATE-----\n" \
"MIIEAzCCAuugAwIBAgIUBY1hlCGvdj4NhBXkZ/uLUZNILAwwDQYJKoZIhvcNAQEL\n" \
"BQAwgZAxCzAJBgNVBAYTAkdCMRcwFQYDVQQIDA5Vbml0ZWQgS2luZ2RvbTEOMAwG\n" \
"A1UEBwwFRGVyYnkxEjAQBgNVBAoMCU1vc3F1aXR0bzELMA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