From 333a68936a5ac13fa7321b25e50bdacbdc07cd2b Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 5 Jul 2024 13:33:50 +0200 Subject: [PATCH] feat(websocket): adding support for `if_name` when using WSS transport --- components/esp_websocket_client/esp_websocket_client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/esp_websocket_client/esp_websocket_client.c b/components/esp_websocket_client/esp_websocket_client.c index 6b7e897309..c6cf47f8ec 100644 --- a/components/esp_websocket_client/esp_websocket_client.c +++ b/components/esp_websocket_client/esp_websocket_client.c @@ -500,6 +500,10 @@ static esp_err_t esp_websocket_client_create_transport(esp_websocket_client_hand if (client->keep_alive_cfg.keep_alive_enable) { esp_transport_ssl_set_keep_alive(ssl, &client->keep_alive_cfg); } + if (client->if_name) { + esp_transport_ssl_set_interface_name(ssl, client->if_name); + } + if (client->config->use_global_ca_store == true) { esp_transport_ssl_enable_global_ca_store(ssl); } else if (client->config->cert) {