websocket_example.c WSS
Posted: Tue Sep 14, 2021 1:03 pm
How do I use the websocket_example.c to connect to a wss:// websocket?
It complains about TLS. I tried setting the transport to be SSL, but this made no difference.
websocket_cfg.transport = WEBSOCKET_TRANSPORT_OVER_SSL;
In sdkconfig, I have enalbed the full default certificate bundle, but when I run, I get the same error trace:
It complains about TLS. I tried setting the transport to be SSL, but this made no difference.
websocket_cfg.transport = WEBSOCKET_TRANSPORT_OVER_SSL;
In sdkconfig, I have enalbed the full default certificate bundle, but when I run, I get the same error trace:
Code: Select all
E (23225) esp-tls-mbedtls: No server verification option set in esp_tls_cfg_t structure. Check esp_tls API reference
E (23225) esp-tls-mbedtls: Failed to set client configurations
E (23225) esp-tls: create_ssl_handle failed
E (23235) esp-tls: Failed to open new connection
E (23235) TRANS_SSL: Failed to open a new connection
E (23245) TRANSPORT_WS: Error connecting to host demo.piesocket.com:443
E (23255) WEBSOCKET_CLIENT: Error transport connect
I (23255) WEBSOCKET_CLIENT: Reconnect after 10000 ms
I (23265) WEBSOCKET: WEBSOCKET_EVENT_DISCONNECTED