lib: rsa: check algo match in rsa_verify_with_keynode
authorMatthieu CASTET <castet.matthieu@free.fr>
Wed, 23 Sep 2020 17:11:44 +0000 (19:11 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 13 Oct 2020 01:30:38 +0000 (21:30 -0400)
commit167fb1f8dc4bb2b99228c4582a462484ad41fa34
tree61cb0b6cdff9191fd3ded48a03f12d94126681f6
parent54ab7cf1dd3f88e124d16c5ef64b0aae4e704ffc
lib: rsa: check algo match in rsa_verify_with_keynode

The algo name should match between the FIT's signature node and the
U-Boot's control FDT.

If we do not check it, U-Boot's control FDT can expect sha512 hash but
nothing will prevent to accept image with sha1 hash if the signature is correct.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
lib/rsa/rsa-verify.c