image: rsa: Move verification algorithm to a linker list
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Wed, 14 Jul 2021 22:05:40 +0000 (17:05 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 16 Jul 2021 19:38:49 +0000 (15:38 -0400)
commit6909edb4cedf90c7a1fb68302dc2cec6291a0fcd
treed83b006910ce994532cbbfed5987ceb530674009
parent0980164b1306400e91e5ac389a514111ff74fc01
image: rsa: Move verification algorithm to a linker list

Move the RSA verification crytpo_algo structure out of the
crypto_algos array, and into a linker list.

Although it appears we are adding an #ifdef to rsa-verify.c, the gains
outweigh this small inconvenience. This is because rsa_verify() is
defined differently based on #ifdefs. This change allows us to have
a single definition of rsa_verify().

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/image-sig.c
lib/rsa/rsa-verify.c