Merge pull request #583 from DCSBL/ws-client-common-name

feat(websocket_client): Add option to set and use cert_common_name in Websocket client (IDFGH-12926)
This commit is contained in:
Suren Gabrielyan
2024-07-10 12:29:52 +04:00
committed by GitHub
2 changed files with 15 additions and 0 deletions

View File

@ -118,6 +118,7 @@ typedef struct {
bool disable_pingpong_discon; /*!< Disable auto-disconnect due to no PONG received within pingpong_timeout_sec */
bool use_global_ca_store; /*!< Use a global ca_store for all the connections in which this bool is set. */
esp_err_t (*crt_bundle_attach)(void *conf); /*!< Function pointer to esp_crt_bundle_attach. Enables the use of certification bundle for server verification, MBEDTLS_CERTIFICATE_BUNDLE must be enabled in menuconfig. Include esp_crt_bundle.h, and use `esp_crt_bundle_attach` here to include bundled CA certificates. */
const char *cert_common_name; /*!< Expected common name of the server certificate */
bool skip_cert_common_name_check;/*!< Skip any validation of server certificate CN field */
bool keep_alive_enable; /*!< Enable keep-alive timeout */
int keep_alive_idle; /*!< Keep-alive idle time. Default is 5 (second) */