lib: rsa: function to verify a signature against a hash
authorHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Fri, 22 May 2020 14:20:33 +0000 (16:20 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jul 2020 21:21:46 +0000 (17:21 -0400)
commitc89b41b4db4a746647c4f0e6d33c6f4edfe96e38
tree387269e837a47126d5a7ccdef2b4d5af60598e16
parentbdded2015c1e54038a86557e339b606b4a31968b
lib: rsa: function to verify a signature against a hash

rsa_verify() expects a memory region and wants to do the hashing itself,
but there may be cases where the hashing is done via other means,
like hashing a squashfs rootfs.

So add rsa_verify_hash() to allow verifiying a signature against
an existing hash. As this entails the same verification routines
we can just move the relevant code over from rsa_verify() and also
call rsa_verify_hash() from there.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
include/u-boot/rsa.h
lib/rsa/rsa-verify.c