Skip to content

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
@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
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
Amends esp8266#8507 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants