Skip to content

Allow update to function over HTTPS due to peek() missing from mbedTLS. #1214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

brokentoaster
Copy link

Removed redundant check of magic byte from writeStream()

  • The magic byte is checked in _writeBuffer() before any flash is altered.
  • The check using peek() earlier will at best only save a wasted read of one buffer length of data being read if data is missing the magic byte
  • As we are already prepared to read an entire buffers worth of data anyway this saving doesn't matter.

Removed redundant check of magic byte from writeStream()

* The magic byte is checked in _writeBuffer() before any flash is altered.
* The check using peek earlier will at best only save a wasted read of one buffer length of data being read if data is correupted.
* As we are already prepared to read an entire buffers worth of data anyway this saving doesn't matter.
@me-no-dev
Copy link
Member

hmm.. I thought we added peek to SSL... @copercini am I wrong?

@copercini
Copy link
Contributor

copercini commented Apr 6, 2018

It's on my fork, https://github.com/copercini/arduino-esp32/blob/master/libraries/WiFiClientSecure/src/WiFiClientSecure.cpp#L116 but I don't have a server to test, so it's only theoretically implemented
@brokentoaster Could you test it if possible?

@me-no-dev
Copy link
Member

Can close this now :)

@me-no-dev me-no-dev closed this Apr 14, 2018
@brokentoaster
Copy link
Author

The use of peek() in Updater was still redundant and can/should/could still be removed from Updater.cpp although it is no longer a requirement in order to simply compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants