Added support to set server common name.

This commit is contained in:
Niklas Gürtler
2023-03-08 10:45:34 +01:00
committed by Euripedes Rocha
parent ffd7d4df6c
commit 6195762d28
4 changed files with 21 additions and 0 deletions

View File

@@ -260,6 +260,10 @@ typedef struct esp_mqtt_client_config_t {
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 */
const char **alpn_protos; /*!< NULL-terminated list of supported application protocols to be used for ALPN */
const char *common_name; /*!< Pointer to the string containing server certificate common name.
If non-NULL, server certificate CN must match this name,
If NULL, server certificate CN must match hostname.
This is ignored if skip_cert_common_name_check=true. */
} verification; /*!< Security verification of the broker */
} broker; /*!< Broker address and security verification */
/**