HTTPS OTA update fails: mbedtls_ssl_read() return -0x7200

bewatermyfriendxd
Posts: 21
Joined: Wed Apr 03, 2019 1:29 pm

HTTPS OTA update fails: mbedtls_ssl_read() return -0x7200

Postby bewatermyfriendxd » Fri Jun 28, 2019 8:38 am

Hello guys,

I switched from HTTP to HTTPS on my device using <esp_https_server.h> with mbedTLS and a self-signed certificate.
I am serving web pages including js and css and also offer an URI handler to do OTA updates.

All the functionalities are working now, except the OTA update.
On a webpage the user can specify a file, which he wants to upload.

The file is then uploaded with content-type: application/octet-stream to the URI handler via POST request. On the ESP the Incoming chunks get processed and written to flash. This worked well with HTTP, but now with HTTPS i get following error:

I (434629) openssl: mbedtls_ssl_read() return -0x7200 (MBEDTLS_ERR_SSL_INVALID_RECORD)
I (434629) openssl: mbedtls_ssl_close_notify() return -0x4e

What can I do to fix this issue?

I'll appreciate any help,
Thanks for the support

Who is online

Users browsing this forum: 低低低低级嵌入式软件工程师 and 198 guests