Enables cypher suite configurations on IDF => 5.5

Merges https://github.com/espressif/esp-mqtt/pull/298
This commit is contained in:
glmfe
2025-05-21 10:05:24 +02:00
parent 00cc9dbd9a
commit 56799069af
2 changed files with 9 additions and 1 deletions

View File

@ -74,6 +74,10 @@
#define MQTT_SUPPORTED_FEATURE_ECDSA_PERIPHERAL #define MQTT_SUPPORTED_FEATURE_ECDSA_PERIPHERAL
#endif #endif
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
// Features supported in 5.5.0
#define MQTT_SUPPORTED_FEATURE_CIPHERSUITES_LIST
#endif
#endif /* ESP_IDF_VERSION */ #endif /* ESP_IDF_VERSION */
#endif // _MQTT_SUPPORTED_FEATURES_H_ #endif // _MQTT_SUPPORTED_FEATURES_H_

View File

@ -158,10 +158,14 @@ static esp_err_t esp_mqtt_set_ssl_transport_properties(esp_transport_list_handle
goto esp_mqtt_set_transport_failed); goto esp_mqtt_set_transport_failed);
} }
if(cfg->ciphersuites_list) if(cfg->ciphersuites_list)
{ {
#if defined(MQTT_SUPPORTED_FEATURE_CIPHERSUITES_LIST)
esp_transport_ssl_set_ciphersuites_list(ssl,cfg->ciphersuites_list); esp_transport_ssl_set_ciphersuites_list(ssl,cfg->ciphersuites_list);
#else
ESP_LOGE(TAG, "Cipher suites list feature is not available in IDF version %s", IDF_VER);
goto esp_mqtt_set_transport_failed;
#endif /* MQTT_SUPPORTED_FEATURE_CIPHERSUITES_LIST */
} }
if (cfg->psk_hint_key) { if (cfg->psk_hint_key) {