mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-10-20 14:38:14 +00:00
SSL: add config option for skipping common name check
Closes IDFGH-3408 Closes https://github.com/espressif/esp-mqtt/issues/158
This commit is contained in:
@@ -182,6 +182,7 @@ typedef struct {
|
||||
int clientkey_password_len; /*!< String length of the password pointed to by clientkey_password */
|
||||
esp_mqtt_protocol_ver_t protocol_ver; /*!< MQTT protocol version used for connection, defaults to value from menuconfig*/
|
||||
int out_buffer_size; /*!< size of MQTT output buffer. If not defined, both output and input buffers have the same size defined as ``buffer_size`` */
|
||||
bool skip_cert_common_name_check; /*!< Skip any validation of server certificate CN field, this reduces the security of TLS and makes the mqtt client susceptible to MITM attacks */
|
||||
} esp_mqtt_client_config_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(3, 3, 0)
|
||||
// Features supported from 3.3
|
||||
#define MQTT_SUPPORTED_FEATURE_EVENT_LOOP
|
||||
#define MQTT_SUPPORTED_FEATURE_SKIP_CRT_CMN_NAME_CHECK
|
||||
#endif
|
||||
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
|
||||
@@ -48,4 +49,4 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // _MQTT_SUPPORTED_FEATURES_H_
|
||||
#endif // _MQTT_SUPPORTED_FEATURES_H_
|
||||
|
||||
Reference in New Issue
Block a user