Closed earlephilhower closed 6 years ago
https://github.com/esp8266/Arduino/issues/3661 is the reason for this PR. I have no idea why it says CI failed, as far as I can see everything built just fine...
The CI build was busted due to an update to test/common.sh in the Arduino repo. Including the fix for it here as it's pretty trivial.
@igrr Thanks! Would you like to rebuild and commit the new library for the Arduino core? I can do it, if needed, but didn't want to step on your toes.
Thx -EFP3
Thanks for the reminder @earlephilhower, created https://github.com/esp8266/Arduino/pull/5125.
When multiple handshake messages are sent in a single fragment, there may be some padding (i.e. pkt_size will be larger than the amount of bytes processed). When this happens, the old code would only advance the working pointer to the end of processed data, which would not be the start of the next packet per the sent pkt_size, causing handshake failure.
Now simply advance the working pointer to the next packet irrespective of how many bytes in the current one were processed in the server_hello message.