Function altcp_tls_create_config_client_2wayauth is failing with MBEDTLS_ERR_PKCS5_INVALID_FORMAT. I followed these instructions here: https://mosquitto.org/man/mosquitto-tls-7.html how to create the necessary files. I cannot find any information or an example on how to use altcp_tls_create_config_client_2wayauth function properly. I am unsure of the file format I should use with the function. Do you have an example and/or links to properly use this function?
My function call:
mqtt_client_info.tls_config = altcp_tls_create_config_client_2wayauth( (const uint8_t *)tls_root_ca_cert, strlen(tls_root_ca_cert) + 1, (const uint8_t *)tls_device_key, strlen(tls_device_key) + 1, (const uint8_t *)"Admin12345",
strlen("Admin12345") + 1, (const uint8_t *)tls_device_cert,
strlen(tls_device_cert) + 1);
About my project: I am using STM32F7 with LWIP to connect to a server running Mosquitto (MQTT) locally on my desktop. My project works without TLS security, but now I am trying to implement TLS without any success.