-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Description
P
Hardware:
Board: ESP32 Dev Module
Core Installation/update date: 11/jul/2017
IDE name: Arduino IDE
Flash Frequency: 40Mhz
Upload Speed: 115200
Description:
The WifiClientSecure class is missing the peek() method, so the peek() from the parent class (WifiClient) is called instead.
The problem with this is that if you are using WifiClientSecure with the Update library to do OTA updates it will fail with a "Invalid Magic Byte" error when Update tries to read the stream and do a peek() at the first magic byte. Likely because the byte isn't being decrypted.
This means that you currently cannot do an OTA update over HTTPS/SSL. :-(
Activity
brokentoaster commentedon Mar 14, 2018
This looks like an issue with mbedTLS
Mbed-TLS/mbedtls#563
brokentoaster commentedon Mar 14, 2018
UpdateClass::writeStream()
could be modified to call_verifyHeader()
inside thewhile(remaining())
loop. Making the call to peek unnecessary.brokentoaster commentedon Mar 14, 2018
The
ESP_IMAGE_HEADER_MAGIC
is also checked inUpdateClass::_writeBuffer()
when the buffer is committed to flash, I think the earlier checks are pointless as no changes will be committed to the flash unless that byte was read correctly.brokentoaster commentedon Mar 14, 2018
try #1214
copercini commentedon Mar 18, 2018
Hi guys, I've implemented something here: https://github.com/copercini/arduino-esp32/tree/master/libraries/WiFiClientSecure/src but I don't have a server with SSL for test if it's working with the update library
copercini commentedon Apr 14, 2018
Now it has =) #1310