Not able to perform OTA from HTTPS server
Posted: Fri Feb 11, 2022 1:37 pm
I'm trying to perform OTA from a HTTPS server and using the advanced_https_ota example. As the readme in the root OTA folder suggests I've tried hosting the OTA server locally and everything works fine, but then I tried uploading the binary to a git repo and trying to download from there. It's most probably an issue with the certificate
I get this as the error
I generated the certificate (as suggested in the readme) with
. Then copied the text between BEGIN and END sections. I've tried all possible combinations of only including the last certificate, both the certificates and only the first certificates. Same with S3 bucket (public), I've tried what Mahavir suggested in this comment https://github.com/espressif/esp-idf/is ... -460917118, but still doesn't work.
I get this as the error
Code: Select all
E (18332) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x2700
I (18332) esp-tls-mbedtls: Failed to verify peer certificate!
E (18342) esp-tls: Failed to open new connection
E (18352) TRANSPORT_BASE: Failed to open a new connection
E (18352) HTTP_CLIENT: Connection failed, sock < 0
E (18362) esp_https_ota: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT
E (18372) esp_https_ota: Failed to establish HTTP connection
E (18372) advanced_https_ota_example: ESP HTTPS OTA Begin failed
Code: Select all
openssl s_client -showcerts -connect github.com:443 </dev/null