Skip to content
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

Fix Updater non-zero _verify->length() once again #8545

Merged
merged 9 commits into from
Sep 13, 2022

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Apr 19, 2022

As mentioned in the #8507 (comment)
I took the liberty to also do some refactoring; specifically, fixing signed vs. unsigned mismatch in len, using pointer object vs. the original manual malloc & free, try to have named constants for certain addresses and lengths, plus localize printing of u8 arrays.

The suggested test to have a 'dummy' verifier works just fine. (...how it actually works and gets the hash to compare with is a whole other question, though)

Another issue noticed while testing, in the underlying bearssl api there's an actual limit for hash length.
https://github.com/earlephilhower/bearssl-esp8266/blob/6105635531027f5b298aa656d44be2289b2d434f/inc/bearssl_rsa.h#L257

@mcspr mcspr changed the title Fix Updater zero _verify->length() once again Fix Updater non-zero _verify->length() once again Apr 19, 2022
cores/esp8266/Updater.cpp Outdated Show resolved Hide resolved
@mcspr mcspr merged commit a0c7a85 into esp8266:master Sep 13, 2022
@mcspr mcspr deleted the updater-fix-len-calc branch September 13, 2022 12:57
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.

2 participants