Skip to content

Commit 5679906

Browse files
committed
Enables cypher suite configurations on IDF => 5.5
Merges #298
1 parent 00cc9db commit 5679906

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

include/mqtt_supported_features.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@
7474
#define MQTT_SUPPORTED_FEATURE_ECDSA_PERIPHERAL
7575
#endif
7676

77+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
78+
// Features supported in 5.5.0
79+
#define MQTT_SUPPORTED_FEATURE_CIPHERSUITES_LIST
80+
#endif
7781

7882
#endif /* ESP_IDF_VERSION */
7983
#endif // _MQTT_SUPPORTED_FEATURES_H_

mqtt_client.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,14 @@ static esp_err_t esp_mqtt_set_ssl_transport_properties(esp_transport_list_handle
158158
goto esp_mqtt_set_transport_failed);
159159

160160
}
161-
162161
if(cfg->ciphersuites_list)
163162
{
163+
#if defined(MQTT_SUPPORTED_FEATURE_CIPHERSUITES_LIST)
164164
esp_transport_ssl_set_ciphersuites_list(ssl,cfg->ciphersuites_list);
165+
#else
166+
ESP_LOGE(TAG, "Cipher suites list feature is not available in IDF version %s", IDF_VER);
167+
goto esp_mqtt_set_transport_failed;
168+
#endif /* MQTT_SUPPORTED_FEATURE_CIPHERSUITES_LIST */
165169
}
166170

167171
if (cfg->psk_hint_key) {

0 commit comments

Comments
 (0)