Page 1 of 1

https server and https client

Posted: Sat Nov 26, 2022 5:35 pm
by accacca
In our ESP32-S3 module we have a task with the HTTPS webserver that use a selfsigned certificate and another task that query our telegram bot periodically (5s) that use another selfisgned certificate.
The Telegram task work well and the queries are always sucessfully completed.
But when a client connect to our webserver (we work in local network only) the page download is ok but after that, for some time the telegram query fail

Code: Select all

I (1410510) HTTP_CLIENT Handler: GET url https://api.telegram.org/bot...../getUpdates

E (1411090) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x2700
I (1411090) esp-tls-mbedtls: Failed to verify peer certificate!
E (1411090) esp-tls: Failed to open new connection
E (1411100) TRANSPORT_BASE: Failed to open a new connection
E (1411110) HTTP_CLIENT: Connection failed, sock < 0
E (1411110) Sending getMe: Error perform http request ESP_ERR_HTTP_CONNECT
but after a few random fails it reverts to the correct behavior

I can not understand where is the problem lwip socket esp-tsl ?
I suspect a problem may be out of sync between client request and telegram task query which sometimes overlap