TLS support

This commit is contained in:
Andrey Aleksandrov
2026-02-04 18:00:22 +02:00
parent 5a22f36ebf
commit 3ff92ea801
4 changed files with 87 additions and 8 deletions

View File

@@ -25,13 +25,14 @@ extern "C"
*/
typedef struct
{
const char *broker_url; /**< MQTT broker URL (e.g., "mqtt://192.168.1.100") */
int broker_port; /**< MQTT broker port (usually 1883 for non-secure) */
const char *client_id; /**< Unique client identifier */
const char *username; /**< Username (can be NULL if not required) */
const char *password; /**< Password (can be NULL if not required) */
int keepalive; /**< Keepalive interval in seconds (0 for default) */
int network_timeout_ms; /**< Network timeout in milliseconds (0 for default) */
const char *broker_url; /**< MQTT broker URL (e.g., "mqtt://192.168.1.100") */
int broker_port; /**< MQTT broker port (usually 1883 for non-secure) */
const char *client_id; /**< Unique client identifier */
const char *username; /**< Username (can be NULL if not required) */
const char *password; /**< Password (can be NULL if not required) */
const char *ca_cert_pem; /**< CA certificate in PEM format (NULL to disable TLS verification) */
int keepalive; /**< Keepalive interval in seconds (0 for default) */
int network_timeout_ms; /**< Network timeout in milliseconds (0 for default) */
} mqtt_config_t;
/**