mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
tcp_transport: Add API to allow skipping of certificate CN validation
This commit is contained in:
parent
9fa23bc599
commit
c536c8fa5f
@ -69,6 +69,15 @@ void esp_transport_ssl_set_client_cert_data(esp_transport_handle_t t, const char
|
|||||||
*/
|
*/
|
||||||
void esp_transport_ssl_set_client_key_data(esp_transport_handle_t t, const char *data, int len);
|
void esp_transport_ssl_set_client_key_data(esp_transport_handle_t t, const char *data, int len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Skip validation of certificate's common name field
|
||||||
|
*
|
||||||
|
* @note Skipping CN validation is not recommended
|
||||||
|
*
|
||||||
|
* @param t ssl transport
|
||||||
|
*/
|
||||||
|
void esp_transport_ssl_skip_common_name_check(esp_transport_handle_t t);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -192,6 +192,14 @@ void esp_transport_ssl_set_client_key_data(esp_transport_handle_t t, const char
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void esp_transport_ssl_skip_common_name_check(esp_transport_handle_t t)
|
||||||
|
{
|
||||||
|
transport_ssl_t *ssl = esp_transport_get_context_data(t);
|
||||||
|
if (t && ssl) {
|
||||||
|
ssl->cfg.skip_common_name = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
esp_transport_handle_t esp_transport_ssl_init()
|
esp_transport_handle_t esp_transport_ssl_init()
|
||||||
{
|
{
|
||||||
esp_transport_handle_t t = esp_transport_init();
|
esp_transport_handle_t t = esp_transport_init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user